diff --git a/MANIFEST.in b/MANIFEST.in index e0a5ef4b..e623df08 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,3 +2,4 @@ include README.rst include LICENSE include requirements.txt include discord/bin/*.dll +include discord/py.typed diff --git a/README.ja.rst b/README.ja.rst deleted file mode 100644 index 32f97786..00000000 --- a/README.ja.rst +++ /dev/null @@ -1,114 +0,0 @@ -discord.py -========== - -.. image:: https://discord.com/api/guilds/336642139381301249/embed.png - :target: https://discord.gg/nXzj3dg - :alt: Discordサーバーの招待 -.. image:: https://img.shields.io/pypi/v/discord.py.svg - :target: https://pypi.python.org/pypi/discord.py - :alt: PyPIのバージョン情報 -.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg - :target: https://pypi.python.org/pypi/discord.py - :alt: PyPIのサポートしているPythonのバージョン - -discord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。 - -主な特徴 -------------- - -- ``async`` と ``await`` を使ったモダンなPythonらしいAPI。 -- 適切なレート制限処理 -- Discord APIによってサポートされているものを100%カバー。 -- メモリと速度の両方を最適化。 - -インストール -------------- - -**Python 3.8 以降のバージョンが必須です** - -完全な音声サポートなしでライブラリをインストールする場合は次のコマンドを実行してください: - -.. code:: sh - - # Linux/OS X - python3 -m pip install -U discord.py - - # Windows - py -3 -m pip install -U discord.py - -音声サポートが必要なら、次のコマンドを実行しましょう: - -.. code:: sh - - # Linux/OS X - python3 -m pip install -U discord.py[voice] - - # Windows - py -3 -m pip install -U discord.py[voice] - - -開発版をインストールしたいのならば、次の手順に従ってください: - -.. code:: sh - - $ git clone https://github.com/Rapptz/discord.py - $ cd discord.py - $ python3 -m pip install -U .[voice] - - -オプションパッケージ -~~~~~~~~~~~~~~~~~~~~~~ - -* PyNaCl (音声サポート用) - -Linuxで音声サポートを導入するには、前述のコマンドを実行する前にお気に入りのパッケージマネージャー(例えば ``apt`` や ``dnf`` など)を使って以下のパッケージをインストールする必要があります: - -* libffi-dev (システムによっては ``libffi-devel``) -* python-dev (例えばPython 3.6用の ``python3.6-dev``) - -簡単な例 --------------- - -.. code:: py - - import discord - - class MyClient(discord.Client): - async def on_ready(self): - print('Logged on as', self.user) - - async def on_message(self, message): - # don't respond to ourselves - if message.author == self.user: - return - - if message.content == 'ping': - await message.channel.send('pong') - - client = MyClient() - client.run('token') - -Botの例 -~~~~~~~~~~~~~ - -.. code:: py - - import discord - from discord.ext import commands - - bot = commands.Bot(command_prefix='>') - - @bot.command() - async def ping(ctx): - await ctx.send('pong') - - bot.run('token') - -examplesディレクトリに更に多くのサンプルがあります。 - -リンク ------- - -- `ドキュメント `_ -- `公式Discordサーバー `_ -- `Discord API `_ diff --git a/README.rst b/README.rst index d5571edd..b8fdf99a 100644 --- a/README.rst +++ b/README.rst @@ -1,24 +1,41 @@ discord.py ========== -.. image:: https://discord.com/api/guilds/336642139381301249/embed.png - :target: https://discord.gg/r3sSKJJ +.. image:: https://discord.com/api/guilds/514232441498763279/embed.png + :target: https://discord.gg/PYAfZzpsjG :alt: Discord server invite -.. image:: https://img.shields.io/pypi/v/discord.py.svg - :target: https://pypi.python.org/pypi/discord.py +.. image:: https://img.shields.io/pypi/v/enhanced-dpy.svg + :target: https://pypi.python.org/pypi/enhanced-dpy :alt: PyPI version info -.. image:: https://img.shields.io/pypi/pyversions/discord.py.svg - :target: https://pypi.python.org/pypi/discord.py +.. image:: https://img.shields.io/pypi/pyversions/enhanced-dpy.svg + :target: https://pypi.python.org/pypi/enhanced-dpy :alt: PyPI supported Python versions -A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. +A modern, maintained, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. + +The Future of enhanced-discord.py +-------------------------- + +Enhanced discord.py is a fork of Rapptz's discord.py, that went unmaintained (`gist `_) + +It is currently maintained by (in alphabetical order) + +- Chillymosh#8175 +- Daggy#9889 +- dank Had0cK#6081 +- Dutchy#6127 +- Eyesofcreeper#0001 +- Gnome!#6669 +- IAmTomahawkx#1000 +- Jadon#2494 + +An overview of added features is available on the `custom features page `_. Key Features ------------- - Modern Pythonic API using ``async`` and ``await``. - Proper rate limit handling. -- 100% coverage of the supported Discord API. - Optimised in both speed and memory. Installing @@ -31,27 +48,17 @@ To install the library without full voice support, you can just run the followin .. code:: sh # Linux/macOS - python3 -m pip install -U discord.py + python3 -m pip install -U enhanced-dpy # Windows - py -3 -m pip install -U discord.py - -Otherwise to get voice support you should run the following command: - -.. code:: sh - - # Linux/macOS - python3 -m pip install -U "discord.py[voice]" - - # Windows - py -3 -m pip install -U discord.py[voice] + py -3 -m pip install -U enhanced-dpy To install the development version, do the following: .. code:: sh - $ git clone https://github.com/Rapptz/discord.py + $ git clone https://github.com/iDevision/enhanced-discord.py $ cd discord.py $ python3 -m pip install -U .[voice] @@ -109,6 +116,6 @@ You can find more examples in the examples directory. Links ------ -- `Documentation `_ -- `Official Discord Server `_ +- `Documentation `_ +- `Official Discord Server `_ - `Discord API `_ diff --git a/discord/__init__.py b/discord/__init__.py index 2a90f292..1e74cf91 100644 --- a/discord/__init__.py +++ b/discord/__init__.py @@ -60,13 +60,15 @@ from .interactions import * from .components import * from .threads import * -class VersionInfo(NamedTuple): - major: int - minor: int - micro: int - releaselevel: Literal["alpha", "beta", "candidate", "final"] - serial: int -version_info = VersionInfo(major=2, minor=0, micro=0, releaselevel='alpha', serial=0) +class VersionInfo(NamedTuple): + major: int + minor: int + micro: int + releaselevel: Literal["alpha", "beta", "candidate", "final"] + serial: int + + +version_info: VersionInfo = VersionInfo(major=2, minor=0, micro=0, releaselevel='alpha', serial=0) logging.getLogger(__name__).addHandler(logging.NullHandler()) diff --git a/discord/__main__.py b/discord/__main__.py index 606cc115..513b0cb3 100644 --- a/discord/__main__.py +++ b/discord/__main__.py @@ -51,7 +51,7 @@ def core(parser, args): if args.version: show_version() -bot_template = """#!/usr/bin/env python3 +_bot_template = """#!/usr/bin/env python3 from discord.ext import commands import discord @@ -77,7 +77,7 @@ bot = Bot() bot.run(config.token) """ -gitignore_template = """# Byte-compiled / optimized / DLL files +_gitignore_template = """# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class @@ -107,7 +107,7 @@ var/ config.py """ -cog_template = '''from discord.ext import commands +_cog_template = '''from discord.ext import commands import discord class {name}(commands.Cog{attrs}): @@ -120,7 +120,7 @@ def setup(bot): bot.add_cog({name}(bot)) ''' -cog_extras = ''' +_cog_extras = ''' def cog_unload(self): # clean up logic goes here pass @@ -170,7 +170,7 @@ _base_table = { # NUL (0) and 1-31 are disallowed _base_table.update((chr(i), None) for i in range(32)) -translation_table = str.maketrans(_base_table) +_translation_table = str.maketrans(_base_table) def to_path(parser, name, *, replace_spaces=False): if isinstance(name, Path): @@ -182,7 +182,7 @@ def to_path(parser, name, *, replace_spaces=False): if len(name) <= 4 and name.upper() in forbidden: parser.error('invalid directory name given, use a different one') - name = name.translate(translation_table) + name = name.translate(_translation_table) if replace_spaces: name = name.replace(' ', '-') return Path(name) @@ -215,14 +215,14 @@ def newbot(parser, args): try: with open(str(new_directory / 'bot.py'), 'w', encoding='utf-8') as fp: base = 'Bot' if not args.sharded else 'AutoShardedBot' - fp.write(bot_template.format(base=base, prefix=args.prefix)) + fp.write(_bot_template.format(base=base, prefix=args.prefix)) except OSError as exc: parser.error(f'could not create bot file ({exc})') if not args.no_git: try: with open(str(new_directory / '.gitignore'), 'w', encoding='utf-8') as fp: - fp.write(gitignore_template) + fp.write(_gitignore_template) except OSError as exc: print(f'warning: could not create .gitignore file ({exc})') @@ -240,7 +240,7 @@ def newcog(parser, args): try: with open(str(directory), 'w', encoding='utf-8') as fp: attrs = '' - extra = cog_extras if args.full else '' + extra = _cog_extras if args.full else '' if args.class_name: name = args.class_name else: @@ -255,7 +255,7 @@ def newcog(parser, args): attrs += f', name="{args.display_name}"' if args.hide_commands: attrs += ', command_attrs=dict(hidden=True)' - fp.write(cog_template.format(name=name, extra=extra, attrs=attrs)) + fp.write(_cog_template.format(name=name, extra=extra, attrs=attrs)) except OSError as exc: parser.error(f'could not create cog file ({exc})') else: diff --git a/discord/abc.py b/discord/abc.py index e6bb0f5a..fd2dc4bb 100644 --- a/discord/abc.py +++ b/discord/abc.py @@ -28,14 +28,14 @@ import copy import asyncio from typing import ( Any, + Callable, Dict, List, - Mapping, Optional, TYPE_CHECKING, Protocol, + Sequence, Tuple, - Type, TypeVar, Union, overload, @@ -52,6 +52,7 @@ from .role import Role from .invite import Invite from .file import File from .voice_client import VoiceClient, VoiceProtocol +from .sticker import GuildSticker, StickerItem from . import utils __all__ = ( @@ -68,6 +69,7 @@ T = TypeVar('T', bound=VoiceProtocol) if TYPE_CHECKING: from datetime import datetime + from .client import Client from .user import ClientUser from .asset import Asset from .state import ConnectionState @@ -76,17 +78,18 @@ if TYPE_CHECKING: from .channel import CategoryChannel from .embeds import Embed from .message import Message, MessageReference, PartialMessage - from .channel import TextChannel, DMChannel, GroupChannel + from .channel import TextChannel, DMChannel, GroupChannel, PartialMessageable from .threads import Thread from .enums import InviteTarget from .ui.view import View from .types.channel import ( PermissionOverwrite as PermissionOverwritePayload, + Channel as ChannelPayload, GuildChannel as GuildChannelPayload, OverwriteType, ) - PartialMessageableChannel = Union[TextChannel, Thread, DMChannel] + PartialMessageableChannel = Union[TextChannel, Thread, DMChannel, PartialMessageable] MessageableChannel = Union[PartialMessageableChannel, GroupChannel] SnowflakeTime = Union["Snowflake", datetime] @@ -120,11 +123,6 @@ class Snowflake(Protocol): __slots__ = () id: int - @property - def created_at(self) -> datetime: - """:class:`datetime.datetime`: Returns the model's creation time as an aware datetime in UTC.""" - raise NotImplementedError - @runtime_checkable class User(Snowflake, Protocol): @@ -305,11 +303,8 @@ class GuildChannel: payload.append(d) await http.bulk_channel_update(self.guild.id, payload, reason=reason) - self.position = position - if parent_id is not _undefined: - self.category_id = int(parent_id) if parent_id else None - async def _edit(self, options: Dict[str, Any], reason: Optional[str]): + async def _edit(self, options: Dict[str, Any], reason: Optional[str]) -> Optional[ChannelPayload]: try: parent = options.pop('category') except KeyError: @@ -388,8 +383,7 @@ class GuildChannel: options['type'] = ch_type.value if options: - data = await self._state.http.edit_channel(self.id, reason=reason, **options) - self._update(self.guild, data) + return await self._state.http.edit_channel(self.id, reason=reason, **options) def _fill_overwrites(self, data: GuildChannelPayload) -> None: self._overwrites = [] @@ -473,7 +467,7 @@ class GuildChannel: return PermissionOverwrite() @property - def overwrites(self) -> Mapping[Union[Role, Member], PermissionOverwrite]: + def overwrites(self) -> Dict[Union[Role, Member], PermissionOverwrite]: """Returns all of the channel's overwrites. This is returned as a dictionary where the key contains the target which @@ -482,7 +476,7 @@ class GuildChannel: Returns -------- - Mapping[Union[:class:`~discord.Role`, :class:`~discord.Member`], :class:`~discord.PermissionOverwrite`] + Dict[Union[:class:`~discord.Role`, :class:`~discord.Member`], :class:`~discord.PermissionOverwrite`] The channel's permission overwrites. """ ret = {} @@ -1146,6 +1140,7 @@ class Messageable: - :class:`~discord.User` - :class:`~discord.Member` - :class:`~discord.ext.commands.Context` + - :class:`~discord.Thread` """ __slots__ = () @@ -1162,6 +1157,7 @@ class Messageable: tts: bool = ..., embed: Embed = ..., file: File = ..., + stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., delete_after: float = ..., nonce: Union[str, int] = ..., allowed_mentions: AllowedMentions = ..., @@ -1179,6 +1175,7 @@ class Messageable: tts: bool = ..., embed: Embed = ..., files: List[File] = ..., + stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., delete_after: float = ..., nonce: Union[str, int] = ..., allowed_mentions: AllowedMentions = ..., @@ -1196,6 +1193,7 @@ class Messageable: tts: bool = ..., embeds: List[Embed] = ..., file: File = ..., + stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., delete_after: float = ..., nonce: Union[str, int] = ..., allowed_mentions: AllowedMentions = ..., @@ -1213,6 +1211,7 @@ class Messageable: tts: bool = ..., embeds: List[Embed] = ..., files: List[File] = ..., + stickers: Sequence[Union[GuildSticker, StickerItem]] = ..., delete_after: float = ..., nonce: Union[str, int] = ..., allowed_mentions: AllowedMentions = ..., @@ -1231,6 +1230,7 @@ class Messageable: embeds=None, file=None, files=None, + stickers=None, delete_after=None, nonce=None, allowed_mentions=None, @@ -1302,6 +1302,10 @@ class Messageable: embeds: List[:class:`~discord.Embed`] A list of embeds to upload. Must be a maximum of 10. + .. versionadded:: 2.0 + stickers: Sequence[Union[:class:`~discord.GuildSticker`, :class:`~discord.StickerItem`]] + A list of stickers to upload. Must be a maximum of 3. + .. versionadded:: 2.0 Raises @@ -1338,6 +1342,9 @@ class Messageable: raise InvalidArgument('embeds parameter must be a list of up to 10 elements') embeds = [embed.to_dict() for embed in embeds] + if stickers is not None: + stickers = [sticker.id for sticker in stickers] + if allowed_mentions is not None: if state.allowed_mentions is not None: allowed_mentions = state.allowed_mentions.merge(allowed_mentions).to_dict() @@ -1382,6 +1389,7 @@ class Messageable: embeds=embeds, nonce=nonce, message_reference=reference, + stickers=stickers, components=components, ) finally: @@ -1404,6 +1412,7 @@ class Messageable: nonce=nonce, allowed_mentions=allowed_mentions, message_reference=reference, + stickers=stickers, components=components, ) finally: @@ -1419,6 +1428,7 @@ class Messageable: nonce=nonce, allowed_mentions=allowed_mentions, message_reference=reference, + stickers=stickers, components=components, ) @@ -1452,6 +1462,7 @@ class Messageable: This means that both ``with`` and ``async with`` work with this. Example Usage: :: + async with channel.typing(): # simulate something heavy await asyncio.sleep(10) @@ -1610,12 +1621,20 @@ class Connectable(Protocol): def _get_voice_state_pair(self) -> Tuple[int, int]: raise NotImplementedError - async def connect(self, *, timeout: float = 60.0, reconnect: bool = True, cls: Type[T] = VoiceClient) -> T: + async def connect( + self, + *, + timeout: float = 60.0, + reconnect: bool = True, + cls: Callable[[Client, Connectable], T] = VoiceClient, + ) -> T: """|coro| Connects to voice and creates a :class:`VoiceClient` to establish your connection to the voice server. + This requires :attr:`Intents.voice_states`. + Parameters ----------- timeout: :class:`float` diff --git a/discord/activity.py b/discord/activity.py index 3f89c477..51205377 100644 --- a/discord/activity.py +++ b/discord/activity.py @@ -830,10 +830,12 @@ def create_activity(data: Optional[ActivityPayload]) -> Optional[ActivityTypes]: except KeyError: return Activity(**data) else: - return CustomActivity(name=name, **data) + # we removed the name key from data already + return CustomActivity(name=name, **data) # type: ignore elif game_type is ActivityType.streaming: if 'url' in data: - return Streaming(**data) + # the url won't be None here + return Streaming(**data) # type: ignore return Activity(**data) elif game_type is ActivityType.listening and 'sync_id' in data and 'session_id' in data: return Spotify(**data) diff --git a/discord/appinfo.py b/discord/appinfo.py index 67082abd..de1f7a73 100644 --- a/discord/appinfo.py +++ b/discord/appinfo.py @@ -146,7 +146,7 @@ class AppInfo: self.rpc_origins: List[str] = data['rpc_origins'] self.bot_public: bool = data['bot_public'] self.bot_require_code_grant: bool = data['bot_require_code_grant'] - self.owner: User = state.store_user(data['owner']) + self.owner: User = state.create_user(data['owner']) team: Optional[TeamPayload] = data.get('team') self.team: Optional[Team] = Team(state, team) if team else None diff --git a/discord/asset.py b/discord/asset.py index e8381189..25c72648 100644 --- a/discord/asset.py +++ b/discord/asset.py @@ -177,6 +177,17 @@ class Asset(AssetMixin): animated=animated, ) + @classmethod + def _from_guild_avatar(cls, state, guild_id: int, member_id: int, avatar: str) -> Asset: + animated = avatar.startswith('a_') + format = 'gif' if animated else 'png' + return cls( + state, + url=f"{cls.BASE}/guilds/{guild_id}/users/{member_id}/avatars/{avatar}.{format}?size=1024", + key=avatar, + animated=animated, + ) + @classmethod def _from_icon(cls, state, object_id: int, icon_hash: str, path: str) -> Asset: return cls( @@ -216,14 +227,25 @@ class Asset(AssetMixin): ) @classmethod - def _from_sticker(cls, state, sticker_id: int, sticker_hash: str) -> Asset: + def _from_sticker_banner(cls, state, banner: int) -> Asset: return cls( state, - url=f'{cls.BASE}/stickers/{sticker_id}/{sticker_hash}.png?size=1024', - key=sticker_hash, + url=f'{cls.BASE}/app-assets/710982414301790216/store/{banner}.png', + key=str(banner), animated=False, ) + @classmethod + def _from_user_banner(cls, state, user_id: int, banner_hash: str) -> Asset: + animated = banner_hash.startswith('a_') + format = 'gif' if animated else 'png' + return cls( + state, + url=f'{cls.BASE}/banners/{user_id}/{banner_hash}.{format}?size=512', + key=banner_hash, + animated=animated + ) + def __str__(self) -> str: return self._url @@ -291,10 +313,11 @@ class Asset(AssetMixin): if self._animated: if format not in VALID_ASSET_FORMATS: raise InvalidArgument(f'format must be one of {VALID_ASSET_FORMATS}') - else: + url = url.with_path(f'{path}.{format}') + elif static_format is MISSING: if format not in VALID_STATIC_FORMATS: raise InvalidArgument(f'format must be one of {VALID_STATIC_FORMATS}') - url = url.with_path(f'{path}.{format}') + url = url.with_path(f'{path}.{format}') if static_format is not MISSING and not self._animated: if static_format not in VALID_STATIC_FORMATS: diff --git a/discord/audit_logs.py b/discord/audit_logs.py index a31d3634..b74bbfef 100644 --- a/discord/audit_logs.py +++ b/discord/audit_logs.py @@ -49,12 +49,17 @@ if TYPE_CHECKING: from .guild import Guild from .member import Member from .role import Role - from .types.audit_log import AuditLogChange as AuditLogChangePayload - from .types.audit_log import AuditLogEntry as AuditLogEntryPayload + from .types.audit_log import ( + AuditLogChange as AuditLogChangePayload, + AuditLogEntry as AuditLogEntryPayload, + ) from .types.channel import PermissionOverwrite as PermissionOverwritePayload from .types.role import Role as RolePayload from .types.snowflake import Snowflake from .user import User + from .stage_instance import StageInstance + from .sticker import GuildSticker + from .threads import Thread def _transform_permissions(entry: AuditLogEntry, data: str) -> Permissions: @@ -69,22 +74,21 @@ def _transform_snowflake(entry: AuditLogEntry, data: Snowflake) -> int: return int(data) -def _transform_channel(entry: AuditLogEntry, data: Optional[Snowflake]) -> Optional[Object]: +def _transform_channel(entry: AuditLogEntry, data: Optional[Snowflake]) -> Optional[Union[abc.GuildChannel, Object]]: if data is None: return None return entry.guild.get_channel(int(data)) or Object(id=data) -def _transform_owner_id(entry: AuditLogEntry, data: Optional[Snowflake]) -> Union[Member, User, None]: +def _transform_member_id(entry: AuditLogEntry, data: Optional[Snowflake]) -> Union[Member, User, None]: if data is None: return None return entry._get_member(int(data)) - -def _transform_inviter_id(entry: AuditLogEntry, data: Optional[Snowflake]) -> Union[Member, User, None]: +def _transform_guild_id(entry: AuditLogEntry, data: Optional[Snowflake]) -> Optional[Guild]: if data is None: return None - return entry._get_member(int(data)) + return entry._state._get_guild(data) def _transform_overwrites( @@ -142,6 +146,11 @@ def _enum_transformer(enum: Type[T]) -> Callable[[AuditLogEntry, int], T]: return _transform +def _transform_type(entry: AuditLogEntry, data: Union[int]) -> Union[enums.ChannelType, enums.StickerType]: + if entry.action.name.startswith('sticker_'): + return enums.try_enum(enums.StickerType, data) + else: + return enums.try_enum(enums.ChannelType, data) class AuditLogDiff: def __len__(self) -> int: @@ -176,8 +185,8 @@ class AuditLogChanges: 'permissions': (None, _transform_permissions), 'id': (None, _transform_snowflake), 'color': ('colour', _transform_color), - 'owner_id': ('owner', _transform_owner_id), - 'inviter_id': ('inviter', _transform_inviter_id), + 'owner_id': ('owner', _transform_member_id), + 'inviter_id': ('inviter', _transform_member_id), 'channel_id': ('channel', _transform_channel), 'afk_channel_id': ('afk_channel', _transform_channel), 'system_channel_id': ('system_channel', _transform_channel), @@ -191,12 +200,15 @@ class AuditLogChanges: 'icon_hash': ('icon', _transform_icon), 'avatar_hash': ('avatar', _transform_avatar), 'rate_limit_per_user': ('slowmode_delay', None), + 'guild_id': ('guild', _transform_guild_id), + 'tags': ('emoji', None), 'default_message_notifications': ('default_notifications', _enum_transformer(enums.NotificationLevel)), 'region': (None, _enum_transformer(enums.VoiceRegion)), 'rtc_region': (None, _enum_transformer(enums.VoiceRegion)), 'video_quality_mode': (None, _enum_transformer(enums.VideoQualityMode)), 'privacy_level': (None, _enum_transformer(enums.StagePrivacyLevel)), - 'type': (None, _enum_transformer(enums.ChannelType)), + 'format_type': (None, _enum_transformer(enums.StickerFormatType)), + 'type': (None, _transform_type), } # fmt: on @@ -318,6 +330,10 @@ class AuditLogEntry(Hashable): Returns the entry's hash. + .. describe:: int(x) + + Returns the entry's ID. + .. versionchanged:: 1.7 Audit log entries are now comparable and hashable. @@ -434,7 +450,7 @@ class AuditLogEntry(Hashable): return utils.snowflake_time(self.id) @utils.cached_property - def target(self) -> Union[Guild, abc.GuildChannel, Member, User, Role, Invite, Emoji, Object, None]: + def target(self) -> Union[Guild, abc.GuildChannel, Member, User, Role, Invite, Emoji, StageInstance, GuildSticker, Thread, Object, None]: try: converter = getattr(self, '_convert_target_' + self.action.target_type) except AttributeError: @@ -501,3 +517,12 @@ class AuditLogEntry(Hashable): def _convert_target_message(self, target_id: int) -> Union[Member, User, None]: return self._get_member(target_id) + + def _convert_target_stage_instance(self, target_id: int) -> Union[StageInstance, Object]: + return self.guild.get_stage_instance(target_id) or Object(id=target_id) + + def _convert_target_sticker(self, target_id: int) -> Union[GuildSticker, Object]: + return self._state.get_sticker(target_id) or Object(id=target_id) + + def _convert_target_thread(self, target_id: int) -> Union[Thread, Object]: + return self.guild.get_thread(target_id) or Object(id=target_id) diff --git a/discord/channel.py b/discord/channel.py index f2465392..dc3967c4 100644 --- a/discord/channel.py +++ b/discord/channel.py @@ -26,13 +26,28 @@ from __future__ import annotations import time import asyncio -from typing import Any, Callable, Dict, Iterable, List, Optional, TYPE_CHECKING, Tuple, Type, TypeVar, Union, overload +from typing import ( + Any, + Callable, + Dict, + Iterable, + List, + Mapping, + Optional, + TYPE_CHECKING, + Tuple, + Type, + TypeVar, + Union, + overload, +) import datetime import discord.abc from .permissions import PermissionOverwrite, Permissions from .enums import ChannelType, StagePrivacyLevel, try_enum, VoiceRegion, VideoQualityMode from .mixins import Hashable +from .object import Object from . import utils from .utils import MISSING from .asset import Asset @@ -49,6 +64,7 @@ __all__ = ( 'CategoryChannel', 'StoreChannel', 'GroupChannel', + 'PartialMessageable', ) if TYPE_CHECKING: @@ -70,6 +86,7 @@ if TYPE_CHECKING: StoreChannel as StoreChannelPayload, GroupDMChannel as GroupChannelPayload, ) + from .types.snowflake import SnowflakeList async def _single_delete_strategy(messages: Iterable[Message]): @@ -98,6 +115,10 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): Returns the channel's name. + .. describe:: int(x) + + Returns the channel's ID. + Attributes ----------- name: :class:`str` @@ -127,6 +148,10 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): .. note:: To check if the channel or the guild of that channel are marked as NSFW, consider :meth:`is_nsfw` instead. + default_auto_archive_duration: :class:`int` + The default auto archive duration in minutes for threads created in this channel. + + .. versionadded:: 2.0 """ __slots__ = ( @@ -142,6 +167,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): '_overwrites', '_type', 'last_message_id', + 'default_auto_archive_duration', ) def __init__(self, *, state: ConnectionState, guild: Guild, data: TextChannelPayload): @@ -171,6 +197,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): self.nsfw: bool = data.get('nsfw', False) # Does this need coercion into `int`? No idea yet. self.slowmode_delay: int = data.get('rate_limit_per_user', 0) + self.default_auto_archive_duration: ThreadArchiveDuration = data.get('default_auto_archive_duration', 1440) self._type: int = data.get('type', self._type) self.last_message_id: Optional[int] = utils._get_as_snowflake(data, 'last_message_id') self._fill_overwrites(data) @@ -207,7 +234,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): .. versionadded:: 2.0 """ - return [thread for thread in self.guild.threads if thread.parent_id == self.id] + return [thread for thread in self.guild._threads.values() if thread.parent_id == self.id] def is_nsfw(self) -> bool: """:class:`bool`: Checks if the channel is NSFW.""" @@ -250,13 +277,14 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): sync_permissions: bool = ..., category: Optional[CategoryChannel] = ..., slowmode_delay: int = ..., + default_auto_archive_duration: ThreadArchiveDuration = ..., type: ChannelType = ..., - overwrites: Dict[Union[Role, Member, Snowflake], PermissionOverwrite] = ..., - ) -> None: + overwrites: Mapping[Union[Role, Member, Snowflake], PermissionOverwrite] = ..., + ) -> Optional[TextChannel]: ... @overload - async def edit(self) -> None: + async def edit(self) -> Optional[TextChannel]: ... async def edit(self, *, reason=None, **options): @@ -273,6 +301,9 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): .. versionchanged:: 1.4 The ``type`` keyword-only parameter was added. + .. versionchanged:: 2.0 + Edits are no longer in-place, the newly edited channel is returned instead. + Parameters ---------- name: :class:`str` @@ -298,9 +329,12 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): is only available to guilds that contain ``NEWS`` in :attr:`Guild.features`. reason: Optional[:class:`str`] The reason for editing this channel. Shows up on the audit log. - overwrites: :class:`dict` - A :class:`dict` of target (either a role or a member) to + overwrites: :class:`Mapping` + A :class:`Mapping` of target (either a role or a member) to :class:`PermissionOverwrite` to apply to the channel. + default_auto_archive_duration: :class:`int` + The new default auto archive duration in minutes for threads created in this channel. + Must be one of ``60``, ``1440``, ``4320``, or ``10080``. Raises ------ @@ -311,8 +345,18 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): You do not have permissions to edit the channel. HTTPException Editing the channel failed. + + Returns + -------- + Optional[:class:`.TextChannel`] + The newly edited text channel. If the edit was only positional + then ``None`` is returned instead. """ - await self._edit(options, reason=reason) + + payload = await self._edit(options, reason=reason) + if payload is not None: + # the payload will always be the proper channel payload + return self.__class__(state=self._state, guild=self.guild, data=payload) # type: ignore @utils.copy_doc(discord.abc.GuildChannel.clone) async def clone(self, *, name: Optional[str] = None, reason: Optional[str] = None) -> TextChannel: @@ -366,7 +410,7 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): if len(messages) > 100: raise ClientException('Can only bulk delete messages up to 100 messages') - message_ids: List[int] = [m.id for m in messages] + message_ids: SnowflakeList = [m.id for m in messages] await self._state.http.delete_messages(self.id, message_ids) async def purge( @@ -631,64 +675,73 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): """ return self.guild.get_thread(thread_id) - async def start_thread( + async def create_thread( self, *, name: str, message: Optional[Snowflake] = None, - auto_archive_duration: ThreadArchiveDuration = 1440, + auto_archive_duration: ThreadArchiveDuration = MISSING, + type: Optional[ChannelType] = None, + reason: Optional[str] = None, ) -> Thread: """|coro| - Starts a thread in this text channel. + Creates a thread in this text channel. - If no starter message is passed with the ``message`` parameter then - you must have :attr:`~discord.Permissions.send_messages` and - :attr:`~discord.Permissions.use_private_threads` in order to start the thread. + 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. - If a starter message is passed with the ``message`` parameter then - you must have :attr:`~discord.Permissions.send_messages` and - :attr:`~discord.Permissions.use_threads` in order to start the thread. + .. versionadded:: 2.0 Parameters ----------- name: :class:`str` The name of the thread. message: Optional[:class:`abc.Snowflake`] - A snowflake representing the message to start the thread with. - If ``None`` is passed then a private thread is started. + A snowflake representing the message to create the thread with. + If ``None`` is passed then a private thread is created. Defaults to ``None``. auto_archive_duration: :class:`int` The duration in minutes before a thread is automatically archived for inactivity. - Defaults to ``1440`` or 24 hours. + If not provided, the channel's default auto archive duration is used. + type: Optional[:class:`ChannelType`] + 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``. + reason: :class:`str` + The reason for creating a new thread. Shows up on the audit log. Raises ------- Forbidden - You do not have permissions to start a thread. + You do not have permissions to create a thread. HTTPException Starting the thread failed. Returns -------- :class:`Thread` - The started thread + The created thread """ + if type is None: + type = ChannelType.private_thread + if message is None: - data = await self._state.http.start_private_thread( + data = await self._state.http.start_thread_without_message( self.id, name=name, - auto_archive_duration=auto_archive_duration, - type=ChannelType.private_thread.value, + auto_archive_duration=auto_archive_duration or self.default_auto_archive_duration, + type=type.value, + reason=reason, ) else: - data = await self._state.http.start_public_thread( + data = await self._state.http.start_thread_with_message( self.id, message.id, name=name, - auto_archive_duration=auto_archive_duration, - type=ChannelType.public_thread.value, + auto_archive_duration=auto_archive_duration or self.default_auto_archive_duration, + reason=reason, ) return Thread(guild=self.guild, state=self._state, data=data) @@ -706,6 +759,8 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): You must have :attr:`~Permissions.read_message_history` to use this. If iterating over private threads then :attr:`~Permissions.manage_threads` is also required. + .. versionadded:: 2.0 + Parameters ----------- limit: Optional[:class:`bool`] @@ -734,27 +789,6 @@ class TextChannel(discord.abc.Messageable, discord.abc.GuildChannel, Hashable): """ return ArchivedThreadIterator(self.id, self.guild, limit=limit, joined=joined, private=private, before=before) - async def active_threads(self) -> List[Thread]: - """|coro| - - Returns a list of active :class:`Thread` that the client can access. - - This includes both private and public threads. - - Raises - ------ - HTTPException - The request to get the active threads failed. - - Returns - -------- - List[:class:`Thread`] - The archived threads - """ - data = await self._state.http.get_active_threads(self.id) - # TODO: thread members? - return [Thread(guild=self.guild, state=self._state, data=d) for d in data.get('threads', [])] - class VocalGuildChannel(discord.abc.Connectable, discord.abc.GuildChannel, Hashable): __slots__ = ( @@ -930,15 +964,15 @@ class VoiceChannel(VocalGuildChannel): position: int = ..., sync_permissions: int = ..., category: Optional[CategoryChannel] = ..., - overwrites: Dict[Union[Role, Member], PermissionOverwrite] = ..., + overwrites: Mapping[Union[Role, Member], PermissionOverwrite] = ..., rtc_region: Optional[VoiceRegion] = ..., video_quality_mode: VideoQualityMode = ..., reason: Optional[str] = ..., - ) -> None: + ) -> Optional[VoiceChannel]: ... @overload - async def edit(self) -> None: + async def edit(self) -> Optional[VoiceChannel]: ... async def edit(self, *, reason=None, **options): @@ -952,6 +986,9 @@ class VoiceChannel(VocalGuildChannel): .. versionchanged:: 1.3 The ``overwrites`` keyword-only parameter was added. + .. versionchanged:: 2.0 + Edits are no longer in-place, the newly edited channel is returned instead. + Parameters ---------- name: :class:`str` @@ -970,8 +1007,8 @@ class VoiceChannel(VocalGuildChannel): category. reason: Optional[:class:`str`] The reason for editing this channel. Shows up on the audit log. - overwrites: :class:`dict` - A :class:`dict` of target (either a role or a member) to + overwrites: :class:`Mapping` + A :class:`Mapping` of target (either a role or a member) to :class:`PermissionOverwrite` to apply to the channel. rtc_region: Optional[:class:`VoiceRegion`] The new region for the voice channel's voice communication. @@ -991,9 +1028,18 @@ class VoiceChannel(VocalGuildChannel): You do not have permissions to edit the channel. HTTPException Editing the channel failed. + + Returns + -------- + Optional[:class:`.VoiceChannel`] + The newly edited voice channel. If the edit was only positional + then ``None`` is returned instead. """ - await self._edit(options, reason=reason) + payload = await self._edit(options, reason=reason) + if payload is not None: + # the payload will always be the proper channel payload + return self.__class__(state=self._state, guild=self.guild, data=payload) # type: ignore class StageChannel(VocalGuildChannel): @@ -1119,7 +1165,9 @@ class StageChannel(VocalGuildChannel): """ return utils.get(self.guild.stage_instances, channel_id=self.id) - async def create_instance(self, *, topic: str, privacy_level: StagePrivacyLevel = MISSING) -> StageInstance: + async def create_instance( + self, *, topic: str, privacy_level: StagePrivacyLevel = MISSING, reason: Optional[str] = None + ) -> StageInstance: """|coro| Create a stage instance. @@ -1135,6 +1183,8 @@ class StageChannel(VocalGuildChannel): The stage instance's topic. privacy_level: :class:`StagePrivacyLevel` The stage instance's privacy level. Defaults to :attr:`StagePrivacyLevel.guild_only`. + reason: :class:`str` + The reason the stage instance was created. Shows up on the audit log. Raises ------ @@ -1159,7 +1209,7 @@ class StageChannel(VocalGuildChannel): payload['privacy_level'] = privacy_level.value - data = await self._state.http.create_stage_instance(**payload) + data = await self._state.http.create_stage_instance(**payload, reason=reason) return StageInstance(guild=self.guild, state=self._state, data=data) async def fetch_instance(self) -> StageInstance: @@ -1193,15 +1243,15 @@ class StageChannel(VocalGuildChannel): position: int = ..., sync_permissions: int = ..., category: Optional[CategoryChannel] = ..., - overwrites: Dict[Union[Role, Member], PermissionOverwrite] = ..., + overwrites: Mapping[Union[Role, Member], PermissionOverwrite] = ..., rtc_region: Optional[VoiceRegion] = ..., video_quality_mode: VideoQualityMode = ..., reason: Optional[str] = ..., - ) -> None: + ) -> Optional[StageChannel]: ... @overload - async def edit(self) -> None: + async def edit(self) -> Optional[StageChannel]: ... async def edit(self, *, reason=None, **options): @@ -1215,6 +1265,9 @@ class StageChannel(VocalGuildChannel): .. versionchanged:: 2.0 The ``topic`` parameter must now be set via :attr:`create_instance`. + .. versionchanged:: 2.0 + Edits are no longer in-place, the newly edited channel is returned instead. + Parameters ---------- name: :class:`str` @@ -1229,8 +1282,8 @@ class StageChannel(VocalGuildChannel): category. reason: Optional[:class:`str`] The reason for editing this channel. Shows up on the audit log. - overwrites: :class:`dict` - A :class:`dict` of target (either a role or a member) to + overwrites: :class:`Mapping` + A :class:`Mapping` of target (either a role or a member) to :class:`PermissionOverwrite` to apply to the channel. rtc_region: Optional[:class:`VoiceRegion`] The new region for the stage channel's voice communication. @@ -1248,9 +1301,18 @@ class StageChannel(VocalGuildChannel): You do not have permissions to edit the channel. HTTPException Editing the channel failed. + + Returns + -------- + Optional[:class:`.StageChannel`] + The newly edited stage channel. If the edit was only positional + then ``None`` is returned instead. """ - await self._edit(options, reason=reason) + payload = await self._edit(options, reason=reason) + if payload is not None: + # the payload will always be the proper channel payload + return self.__class__(state=self._state, guild=self.guild, data=payload) # type: ignore class CategoryChannel(discord.abc.GuildChannel, Hashable): @@ -1276,6 +1338,10 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable): Returns the category's name. + .. describe:: int(x) + + Returns the category's ID. + Attributes ----------- name: :class:`str` @@ -1337,13 +1403,13 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable): name: str = ..., position: int = ..., nsfw: bool = ..., - overwrites: Dict[Union[Role, Member], PermissionOverwrite] = ..., + overwrites: Mapping[Union[Role, Member], PermissionOverwrite] = ..., reason: Optional[str] = ..., - ) -> None: + ) -> Optional[CategoryChannel]: ... @overload - async def edit(self) -> None: + async def edit(self) -> Optional[CategoryChannel]: ... async def edit(self, *, reason=None, **options): @@ -1357,6 +1423,9 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable): .. versionchanged:: 1.3 The ``overwrites`` keyword-only parameter was added. + .. versionchanged:: 2.0 + Edits are no longer in-place, the newly edited channel is returned instead. + Parameters ---------- name: :class:`str` @@ -1367,8 +1436,8 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable): To mark the category as NSFW or not. reason: Optional[:class:`str`] The reason for editing this category. Shows up on the audit log. - overwrites: :class:`dict` - A :class:`dict` of target (either a role or a member) to + overwrites: :class:`Mapping` + A :class:`Mapping` of target (either a role or a member) to :class:`PermissionOverwrite` to apply to the channel. Raises @@ -1379,9 +1448,18 @@ class CategoryChannel(discord.abc.GuildChannel, Hashable): You do not have permissions to edit the category. HTTPException Editing the category failed. + + Returns + -------- + Optional[:class:`.CategoryChannel`] + The newly edited category channel. If the edit was only positional + then ``None`` is returned instead. """ - await self._edit(options=options, reason=reason) + payload = await self._edit(options, reason=reason) + if payload is not None: + # the payload will always be the proper channel payload + return self.__class__(state=self._state, guild=self.guild, data=payload) # type: ignore @utils.copy_doc(discord.abc.GuildChannel.move) async def move(self, **kwargs): @@ -1486,6 +1564,10 @@ class StoreChannel(discord.abc.GuildChannel, Hashable): Returns the channel's name. + .. describe:: int(x) + + Returns the channel's ID. + Attributes ----------- name: :class:`str` @@ -1570,12 +1652,12 @@ class StoreChannel(discord.abc.GuildChannel, Hashable): sync_permissions: bool = ..., category: Optional[CategoryChannel], reason: Optional[str], - overwrites: Dict[Union[Role, Member], PermissionOverwrite], - ) -> None: + overwrites: Mapping[Union[Role, Member], PermissionOverwrite], + ) -> Optional[StoreChannel]: ... @overload - async def edit(self) -> None: + async def edit(self) -> Optional[StoreChannel]: ... async def edit(self, *, reason=None, **options): @@ -1586,6 +1668,9 @@ class StoreChannel(discord.abc.GuildChannel, Hashable): You must have the :attr:`~Permissions.manage_channels` permission to use this. + .. versionchanged:: 2.0 + Edits are no longer in-place, the newly edited channel is returned instead. + Parameters ---------- name: :class:`str` @@ -1602,8 +1687,8 @@ class StoreChannel(discord.abc.GuildChannel, Hashable): category. reason: Optional[:class:`str`] The reason for editing this channel. Shows up on the audit log. - overwrites: :class:`dict` - A :class:`dict` of target (either a role or a member) to + overwrites: :class:`Mapping` + A :class:`Mapping` of target (either a role or a member) to :class:`PermissionOverwrite` to apply to the channel. .. versionadded:: 1.3 @@ -1617,8 +1702,18 @@ class StoreChannel(discord.abc.GuildChannel, Hashable): You do not have permissions to edit the channel. HTTPException Editing the channel failed. + + Returns + -------- + Optional[:class:`.StoreChannel`] + The newly edited store channel. If the edit was only positional + then ``None`` is returned instead. """ - await self._edit(options, reason=reason) + + payload = await self._edit(options, reason=reason) + if payload is not None: + # the payload will always be the proper channel payload + return self.__class__(state=self._state, guild=self.guild, data=payload) # type: ignore DMC = TypeVar('DMC', bound='DMChannel') @@ -1645,6 +1740,10 @@ class DMChannel(discord.abc.Messageable, Hashable): Returns a string representation of the channel + .. describe:: int(x) + + Returns the channel's ID. + Attributes ---------- recipient: Optional[:class:`User`] @@ -1682,6 +1781,7 @@ class DMChannel(discord.abc.Messageable, Hashable): self._state = state self.id = channel_id self.recipient = None + # state.user won't be None here self.me = state.user # type: ignore return self @@ -1770,6 +1870,10 @@ class GroupChannel(discord.abc.Messageable, Hashable): Returns a string representation of the channel + .. describe:: int(x) + + Returns the channel's ID. + Attributes ---------- recipients: List[:class:`User`] @@ -1892,6 +1996,73 @@ class GroupChannel(discord.abc.Messageable, Hashable): await self._state.http.leave_group(self.id) +class PartialMessageable(discord.abc.Messageable, Hashable): + """Represents a partial messageable to aid with working messageable channels when + only a channel ID are present. + + The only way to construct this class is through :meth:`Client.get_partial_messageable`. + + Note that this class is trimmed down and has no rich attributes. + + .. versionadded:: 2.0 + + .. container:: operations + + .. describe:: x == y + + Checks if two partial messageables are equal. + + .. describe:: x != y + + Checks if two partial messageables are not equal. + + .. describe:: hash(x) + + Returns the partial messageable's hash. + + .. describe:: int(x) + + Returns the messageable's ID. + + Attributes + ----------- + id: :class:`int` + The channel ID associated with this partial messageable. + type: Optional[:class:`ChannelType`] + The channel type associated with this partial messageable, if given. + """ + + def __init__(self, state: ConnectionState, id: int, type: Optional[ChannelType] = None): + self._state: ConnectionState = state + self._channel: Object = Object(id=id) + self.id: int = id + self.type: Optional[ChannelType] = type + + async def _get_channel(self) -> Object: + return self._channel + + def get_partial_message(self, message_id: int, /) -> PartialMessage: + """Creates a :class:`PartialMessage` from the message ID. + + This is useful if you want to work with a message and only have its ID without + doing an unnecessary API call. + + Parameters + ------------ + message_id: :class:`int` + The message ID to create a partial message for. + + Returns + --------- + :class:`PartialMessage` + The partial message. + """ + + from .message import PartialMessage + + return PartialMessage(channel=self, id=message_id) + + def _guild_channel_factory(channel_type: int): value = try_enum(ChannelType, channel_type) if value is ChannelType.text: @@ -1919,8 +2090,16 @@ def _channel_factory(channel_type: int): else: return cls, value + def _threaded_channel_factory(channel_type: int): cls, value = _channel_factory(channel_type) if value in (ChannelType.private_thread, ChannelType.public_thread, ChannelType.news_thread): return Thread, value return cls, value + + +def _threaded_guild_channel_factory(channel_type: int): + cls, value = _guild_channel_factory(channel_type) + if value in (ChannelType.private_thread, ChannelType.public_thread, ChannelType.news_thread): + return Thread, value + return cls, value diff --git a/discord/client.py b/discord/client.py index 298dff3a..b4f1db17 100644 --- a/discord/client.py +++ b/discord/client.py @@ -29,17 +29,17 @@ import logging import signal import sys import traceback -from typing import Any, Callable, Coroutine, Dict, Generator, Iterable, List, Optional, Sequence, TYPE_CHECKING, Tuple, TypeVar, Union +from typing import Any, Callable, Coroutine, Dict, Generator, List, Optional, Sequence, TYPE_CHECKING, Tuple, TypeVar, Union import aiohttp -from .user import User +from .user import User, ClientUser from .invite import Invite from .template import Template from .widget import Widget from .guild import Guild from .emoji import Emoji -from .channel import _threaded_channel_factory +from .channel import _threaded_channel_factory, PartialMessageable from .enums import ChannelType from .mentions import AllowedMentions from .errors import * @@ -60,11 +60,11 @@ from .appinfo import AppInfo from .ui.view import View from .stage_instance import StageInstance from .threads import Thread +from .sticker import GuildSticker, StandardSticker, StickerPack, _sticker_factory if TYPE_CHECKING: from .abc import SnowflakeTime, PrivateChannel, GuildChannel, Snowflake from .channel import DMChannel - from .user import ClientUser from .message import Message from .member import Member from .voice_client import VoiceProtocol @@ -76,7 +76,7 @@ __all__ = ( Coro = TypeVar('Coro', bound=Callable[..., Coroutine[Any, Any, Any]]) -log: logging.Logger = logging.getLogger(__name__) +_log = logging.getLogger(__name__) def _cancel_tasks(loop: asyncio.AbstractEventLoop) -> None: tasks = {t for t in asyncio.all_tasks(loop=loop) if not t.done()} @@ -84,12 +84,12 @@ def _cancel_tasks(loop: asyncio.AbstractEventLoop) -> None: if not tasks: return - log.info('Cleaning up after %d tasks.', len(tasks)) + _log.info('Cleaning up after %d tasks.', len(tasks)) for task in tasks: task.cancel() loop.run_until_complete(asyncio.gather(*tasks, return_exceptions=True)) - log.info('All tasks finished cancelling.') + _log.info('All tasks finished cancelling.') for task in tasks: if task.cancelled(): @@ -106,7 +106,7 @@ def _cleanup_loop(loop: asyncio.AbstractEventLoop) -> None: _cancel_tasks(loop) loop.run_until_complete(loop.shutdown_asyncgens()) finally: - log.info('Closing the event loop.') + _log.info('Closing the event loop.') loop.close() class Client: @@ -142,7 +142,6 @@ class Client: intents: :class:`Intents` 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. - If not given, defaults to a regularly constructed :class:`Intents` class. .. versionadded:: 1.5 member_cache_flags: :class:`MemberCacheFlags` @@ -184,6 +183,14 @@ class Client: sync your system clock to Google's NTP server. .. versionadded:: 1.3 + enable_debug_events: :class:`bool` + Whether to enable events that are useful only for debugging gateway related information. + + 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``. + + .. versionadded:: 2.0 Attributes ----------- @@ -195,9 +202,13 @@ class Client: def __init__( self, *, + intents: Intents, loop: Optional[asyncio.AbstractEventLoop] = None, **options: Any, ): + options["intents"] = intents + + # self.ws is set in the connect method self.ws: DiscordWebSocket = None # type: ignore self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() if loop is None else loop self._listeners: Dict[str, List[Tuple[asyncio.Future, Callable[..., bool]]]] = {} @@ -218,6 +229,7 @@ class Client: 'before_identify': self._call_before_identify_hook } + self._enable_debug_events: bool = options.pop('enable_debug_events', False) self._connection: ConnectionState = self._get_state(**options) self._connection.shard_count = self.shard_count self._closed: bool = False @@ -227,7 +239,7 @@ class Client: if VoiceClient.warn_nacl: VoiceClient.warn_nacl = False - log.warning("PyNaCl is not installed, voice will NOT be supported") + _log.warning("PyNaCl is not installed, voice will NOT be supported") # internals @@ -277,6 +289,14 @@ class Client: """List[:class:`.Emoji`]: The emojis that the connected client has.""" return self._connection.emojis + @property + def stickers(self) -> List[GuildSticker]: + """List[:class:`.GuildSticker`]: The stickers that the connected client has. + + .. versionadded:: 2.0 + """ + return self._connection.stickers + @property def cached_messages(self) -> Sequence[Message]: """Sequence[:class:`.Message`]: Read-only list of messages the connected client has cached. @@ -311,6 +331,8 @@ class Client: If this is not passed via ``__init__`` then this is retrieved through the gateway when an event contains the data. Usually after :func:`~discord.on_connect` is called. + + .. versionadded:: 2.0 """ return self._connection.application_id @@ -318,7 +340,7 @@ class Client: def application_flags(self) -> ApplicationFlags: """:class:`~discord.ApplicationFlags`: The client's application flags. - .. versionadded: 2.0 + .. versionadded:: 2.0 """ return self._connection.application_flags # type: ignore @@ -343,7 +365,7 @@ class Client: return asyncio.create_task(wrapped, name=f'discord.py: {event_name}') def dispatch(self, event: str, *args: Any, **kwargs: Any) -> None: - log.debug('Dispatching event %s', event) + _log.debug('Dispatching event %s', event) method = 'on_' + event listeners = self._listeners.get(event) @@ -448,8 +470,10 @@ class Client: passing status code. """ - log.info('logging in using static token') - await self.http.static_login(token.strip()) + _log.info('logging in using static token') + + data = await self.http.static_login(token.strip()) + self._connection.user = ClientUser(state=self._connection, data=data) async def connect(self, *, reconnect: bool = True) -> None: """|coro| @@ -489,7 +513,7 @@ class Client: while True: await self.ws.poll_event() except ReconnectWebSocket as e: - log.info('Got a request to %s the websocket.', e.op) + _log.info('Got a request to %s the websocket.', e.op) self.dispatch('disconnect') ws_params.update(sequence=self.ws.sequence, resume=e.resume, session=self.ws.session_id) continue @@ -528,7 +552,7 @@ class Client: raise retry = backoff.delay() - log.exception("Attempting a reconnect in %.2fs", retry) + _log.exception("Attempting a reconnect in %.2fs", retry) await asyncio.sleep(retry) # Always try to RESUME the connection # If the connection is not RESUME-able then the gateway will invalidate the session. @@ -630,10 +654,10 @@ class Client: try: loop.run_forever() except KeyboardInterrupt: - log.info('Received signal to terminate bot and event loop.') + _log.info('Received signal to terminate bot and event loop.') finally: future.remove_done_callback(stop_loop_on_completion) - log.info('Cleaning up tasks.') + _log.info('Cleaning up tasks.') _cleanup_loop(loop) if not future.cancelled(): @@ -661,9 +685,30 @@ class Client: if value is None: self._connection._activity = None elif isinstance(value, BaseActivity): - self._connection._activity = value.to_dict() + # ConnectionState._activity is typehinted as ActivityPayload, we're passing Dict[str, Any] + self._connection._activity = value.to_dict() # type: ignore else: raise TypeError('activity must derive from BaseActivity.') + + @property + def status(self): + """:class:`.Status`: + The status being used upon logging on to Discord. + + .. versionadded: 2.0 + """ + if self._connection._status in set(state.value for state in Status): + return Status(self._connection._status) + return Status.online + + @status.setter + def status(self, value): + if value is Status.offline: + self._connection._status = 'invisible' + elif isinstance(value, Status): + self._connection._status = str(value) + else: + raise TypeError('status must derive from Status.') @property def allowed_mentions(self) -> Optional[AllowedMentions]: @@ -695,8 +740,8 @@ class Client: """List[:class:`~discord.User`]: Returns a list of all the users the bot can see.""" return list(self._connection._users.values()) - def get_channel(self, id: int) -> Optional[Union[GuildChannel, PrivateChannel]]: - """Returns a channel with the given ID. + def get_channel(self, id: int, /) -> Optional[Union[GuildChannel, Thread, PrivateChannel]]: + """Returns a channel or thread with the given ID. Parameters ----------- @@ -705,12 +750,34 @@ class Client: Returns -------- - Optional[Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]] + Optional[Union[:class:`.abc.GuildChannel`, :class:`.Thread`, :class:`.abc.PrivateChannel`]] The returned channel or ``None`` if not found. """ return self._connection.get_channel(id) - def get_stage_instance(self, id) -> Optional[StageInstance]: + def get_partial_messageable(self, id: int, *, type: Optional[ChannelType] = None) -> PartialMessageable: + """Returns a partial messageable with the given channel ID. + + This is useful if you have a channel_id but don't want to do an API call + to send messages to it. + + .. versionadded:: 2.0 + + Parameters + ----------- + id: :class:`int` + The channel ID to create a partial messageable for. + type: Optional[:class:`.ChannelType`] + The underlying channel type for the partial messageable. + + Returns + -------- + :class:`.PartialMessageable` + The partial messageable + """ + return PartialMessageable(state=self._connection, id=id, type=type) + + def get_stage_instance(self, id: int, /) -> Optional[StageInstance]: """Returns a stage instance with the given stage channel ID. .. versionadded:: 2.0 @@ -732,7 +799,7 @@ class Client: if isinstance(channel, StageChannel): return channel.instance - def get_guild(self, id) -> Optional[Guild]: + def get_guild(self, id: int, /) -> Optional[Guild]: """Returns a guild with the given ID. Parameters @@ -747,7 +814,7 @@ class Client: """ return self._connection._get_guild(id) - def get_user(self, id) -> Optional[User]: + def get_user(self, id: int, /) -> Optional[User]: """Returns a user with the given ID. Parameters @@ -762,7 +829,7 @@ class Client: """ return self._connection.get_user(id) - def get_emoji(self, id) -> Optional[Emoji]: + def get_emoji(self, id: int, /) -> Optional[Emoji]: """Returns an emoji with the given ID. Parameters @@ -777,6 +844,23 @@ class Client: """ return self._connection.get_emoji(id) + def get_sticker(self, id: int, /) -> Optional[GuildSticker]: + """Returns a guild sticker with the given ID. + + .. versionadded:: 2.0 + + .. note:: + + To retrieve standard stickers, use :meth:`.fetch_sticker`. + or :meth:`.fetch_premium_sticker_packs`. + + Returns + -------- + Optional[:class:`.GuildSticker`] + The sticker or ``None`` if not found. + """ + return self._connection.get_sticker(id) + def get_all_channels(self) -> Generator[GuildChannel, None, None]: """A generator that retrieves every :class:`.abc.GuildChannel` the client can 'access'. @@ -959,7 +1043,7 @@ class Client: raise TypeError('event registered must be a coroutine function') setattr(self, coro.__name__, coro) - log.debug('%s has successfully been registered as an event', coro.__name__) + _log.debug('%s has successfully been registered as an event', coro.__name__) return coro async def change_presence( @@ -1109,7 +1193,7 @@ class Client: data = await self.http.get_template(code) return Template(data=data, state=self._connection) # type: ignore - async def fetch_guild(self, guild_id: int) -> Guild: + async def fetch_guild(self, guild_id: int, /) -> Guild: """|coro| Retrieves a :class:`.Guild` from an ID. @@ -1198,7 +1282,7 @@ class Client: data = await self.http.create_guild(name, region_value, icon_base64) return Guild(data=data, state=self._connection) - async def fetch_stage_instance(self, channel_id: int) -> StageInstance: + async def fetch_stage_instance(self, channel_id: int, /) -> StageInstance: """|coro| Gets a :class:`.StageInstance` for a stage channel id. @@ -1298,7 +1382,7 @@ class Client: # Miscellaneous stuff - async def fetch_widget(self, guild_id: int) -> Widget: + async def fetch_widget(self, guild_id: int, /) -> Widget: """|coro| Gets a :class:`.Widget` from a guild ID. @@ -1348,7 +1432,7 @@ class Client: data['rpc_origins'] = None return AppInfo(self._connection, data) - async def fetch_user(self, user_id: int) -> User: + async def fetch_user(self, user_id: int, /) -> User: """|coro| Retrieves a :class:`~discord.User` based on their ID. @@ -1379,7 +1463,7 @@ class Client: data = await self.http.get_user(user_id) return User(state=self._connection, data=data) - async def fetch_channel(self, channel_id: int) -> Union[GuildChannel, PrivateChannel, Thread]: + async def fetch_channel(self, channel_id: int, /) -> Union[GuildChannel, PrivateChannel, Thread]: """|coro| Retrieves a :class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`, or :class:`.Thread` with the specified ID. @@ -1413,15 +1497,18 @@ class Client: raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(data)) if ch_type in (ChannelType.group, ChannelType.private): - channel = factory(me=self.user, data=data, state=self._connection) + # the factory will be a DMChannel or GroupChannel here + channel = factory(me=self.user, data=data, state=self._connection) # type: ignore else: - guild_id = int(data['guild_id']) + # the factory can't be a DMChannel or GroupChannel here + guild_id = int(data['guild_id']) # type: ignore guild = self.get_guild(guild_id) or Object(id=guild_id) - channel = factory(guild=guild, state=self._connection, data=data) + # GuildChannels expect a Guild, we may be passing an Object + channel = factory(guild=guild, state=self._connection, data=data) # type: ignore return channel - async def fetch_webhook(self, webhook_id: int) -> Webhook: + async def fetch_webhook(self, webhook_id: int, /) -> Webhook: """|coro| Retrieves a :class:`.Webhook` with the specified ID. @@ -1443,6 +1530,49 @@ class Client: data = await self.http.get_webhook(webhook_id) return Webhook.from_state(data, state=self._connection) + async def fetch_sticker(self, sticker_id: int, /) -> Union[StandardSticker, GuildSticker]: + """|coro| + + Retrieves a :class:`.Sticker` with the specified ID. + + .. versionadded:: 2.0 + + Raises + -------- + :exc:`.HTTPException` + Retrieving the sticker failed. + :exc:`.NotFound` + Invalid sticker ID. + + Returns + -------- + Union[:class:`.StandardSticker`, :class:`.GuildSticker`] + The sticker you requested. + """ + data = await self.http.get_sticker(sticker_id) + cls, _ = _sticker_factory(data['type']) # type: ignore + return cls(state=self._connection, data=data) # type: ignore + + async def fetch_premium_sticker_packs(self) -> List[StickerPack]: + """|coro| + + Retrieves all available premium sticker packs. + + .. versionadded:: 2.0 + + Raises + ------- + :exc:`.HTTPException` + Retrieving the sticker packs failed. + + Returns + --------- + List[:class:`.StickerPack`] + All available premium sticker packs. + """ + data = await self.http.list_premium_sticker_packs() + return [StickerPack(state=self._connection, data=pack) for pack in data['sticker_packs']] + async def create_dm(self, user: Snowflake) -> DMChannel: """|coro| @@ -1476,6 +1606,8 @@ class Client: This method should be used for when a view is comprised of components that last longer than the lifecycle of the program. + + .. versionadded:: 2.0 Parameters ------------ @@ -1505,5 +1637,8 @@ class Client: @property def persistent_views(self) -> Sequence[View]: - """Sequence[:class:`.View`]: A sequence of persistent views added to the client.""" + """Sequence[:class:`.View`]: A sequence of persistent views added to the client. + + .. versionadded:: 2.0 + """ return self._connection.persistent_views diff --git a/discord/colour.py b/discord/colour.py index 08b4831a..927addc1 100644 --- a/discord/colour.py +++ b/discord/colour.py @@ -78,7 +78,7 @@ class Colour: __slots__ = ('value',) - def __init__(self, value): + def __init__(self, value: int): if not isinstance(value, int): raise TypeError(f'Expected int parameter, received {value.__class__.__name__} instead.') @@ -171,6 +171,14 @@ class Colour: """A factory method that returns a :class:`Colour` with a value of ``0x11806a``.""" return cls(0x11806a) + @classmethod + def brand_green(cls: Type[CT]) -> CT: + """A factory method that returns a :class:`Colour` with a value of ``0x57F287``. + + .. versionadded:: 2.0 + """ + return cls(0x57F287) + @classmethod def green(cls: Type[CT]) -> CT: """A factory method that returns a :class:`Colour` with a value of ``0x2ecc71``.""" @@ -231,6 +239,14 @@ class Colour: """A factory method that returns a :class:`Colour` with a value of ``0xa84300``.""" return cls(0xa84300) + @classmethod + def brand_red(cls: Type[CT]) -> CT: + """A factory method that returns a :class:`Colour` with a value of ``0xED4245``. + + .. versionadded:: 2.0 + """ + return cls(0xED4245) + @classmethod def red(cls: Type[CT]) -> CT: """A factory method that returns a :class:`Colour` with a value of ``0xe74c3c``.""" @@ -308,6 +324,15 @@ class Colour: .. versionadded:: 2.0 """ return cls(0xFEE75C) + + @classmethod + def dark_blurple(cls: Type[CT]) -> CT: + """A factory method that returns a :class:`Colour` with a value of ``0x4E5D94``. + This is the original Dark Blurple branding. + + .. versionadded:: 2.0 + """ + return cls(0x4E5D94) Color = Colour diff --git a/discord/components.py b/discord/components.py index 1ddf7863..74c7be3d 100644 --- a/discord/components.py +++ b/discord/components.py @@ -226,6 +226,8 @@ class SelectMenu(Component): Defaults to 1 and must be between 1 and 25. options: List[:class:`SelectOption`] A list of options that can be selected in this menu. + disabled: :class:`bool` + Whether the select is disabled or not. """ __slots__: Tuple[str, ...] = ( @@ -234,6 +236,7 @@ class SelectMenu(Component): 'min_values', 'max_values', 'options', + 'disabled', ) __repr_info__: ClassVar[Tuple[str, ...]] = __slots__ @@ -245,6 +248,7 @@ class SelectMenu(Component): self.min_values: int = data.get('min_values', 1) self.max_values: int = data.get('max_values', 1) self.options: List[SelectOption] = [SelectOption.from_dict(option) for option in data.get('options', [])] + self.disabled: bool = data.get('disabled', False) def to_dict(self) -> SelectMenuPayload: payload: SelectMenuPayload = { @@ -253,6 +257,7 @@ class SelectMenu(Component): 'min_values': self.min_values, 'max_values': self.max_values, 'options': [op.to_dict() for op in self.options], + 'disabled': self.disabled, } if self.placeholder: @@ -272,14 +277,14 @@ class SelectOption: ----------- label: :class:`str` The label of the option. This is displayed to users. - Can only be up to 25 characters. + Can only be up to 100 characters. value: :class:`str` 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. description: Optional[:class:`str`] An additional description of the option, if any. - Can only be up to 50 characters. + Can only be up to 100 characters. emoji: Optional[Union[:class:`str`, :class:`Emoji`, :class:`PartialEmoji`]] The emoji of the option, if available. default: :class:`bool` diff --git a/discord/context_managers.py b/discord/context_managers.py index bb3b77ab..a3ab0d19 100644 --- a/discord/context_managers.py +++ b/discord/context_managers.py @@ -22,13 +22,23 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + import asyncio +from typing import TYPE_CHECKING, TypeVar, Optional, Type + +if TYPE_CHECKING: + from .abc import Messageable + + from types import TracebackType + + TypingT = TypeVar('TypingT', bound='Typing') __all__ = ( 'Typing', ) -def _typing_done_callback(fut): +def _typing_done_callback(fut: asyncio.Future) -> None: # just retrieve any exception and call it a day try: fut.exception() @@ -36,11 +46,11 @@ def _typing_done_callback(fut): pass class Typing: - def __init__(self, messageable): - self.loop = messageable._state.loop - self.messageable = messageable + def __init__(self, messageable: Messageable) -> None: + self.loop: asyncio.AbstractEventLoop = messageable._state.loop + self.messageable: Messageable = messageable - async def do_typing(self): + async def do_typing(self) -> None: try: channel = self._channel except AttributeError: @@ -52,18 +62,26 @@ class Typing: await typing(channel.id) await asyncio.sleep(5) - def __enter__(self): - self.task = asyncio.ensure_future(self.do_typing(), loop=self.loop) + def __enter__(self: TypingT) -> TypingT: + self.task: asyncio.Task = self.loop.create_task(self.do_typing()) self.task.add_done_callback(_typing_done_callback) return self - def __exit__(self, exc_type, exc, tb): + def __exit__(self, + exc_type: Optional[Type[BaseException]], + exc_value: Optional[BaseException], + traceback: Optional[TracebackType], + ) -> None: self.task.cancel() - async def __aenter__(self): + async def __aenter__(self: TypingT) -> TypingT: self._channel = channel = await self.messageable._get_channel() await channel._state.http.send_typing(channel.id) return self.__enter__() - async def __aexit__(self, exc_type, exc, tb): + async def __aexit__(self, + exc_type: Optional[Type[BaseException]], + exc_value: Optional[BaseException], + traceback: Optional[TracebackType], + ) -> None: self.task.cancel() diff --git a/discord/embeds.py b/discord/embeds.py index f57943f7..25f05aef 100644 --- a/discord/embeds.py +++ b/discord/embeds.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations import datetime -from typing import Any, Dict, Final, List, Protocol, TYPE_CHECKING, Type, TypeVar, Union +from typing import Any, Dict, Final, List, Mapping, Protocol, TYPE_CHECKING, Type, TypeVar, Union from . import utils from .colour import Colour @@ -72,30 +72,36 @@ if TYPE_CHECKING: T = TypeVar('T') MaybeEmpty = Union[T, _EmptyEmbed] + class _EmbedFooterProxy(Protocol): text: MaybeEmpty[str] icon_url: MaybeEmpty[str] + class _EmbedFieldProxy(Protocol): name: MaybeEmpty[str] value: MaybeEmpty[str] inline: bool + class _EmbedMediaProxy(Protocol): url: MaybeEmpty[str] proxy_url: MaybeEmpty[str] height: MaybeEmpty[int] width: MaybeEmpty[int] + class _EmbedVideoProxy(Protocol): url: MaybeEmpty[str] height: MaybeEmpty[int] width: MaybeEmpty[int] + class _EmbedProviderProxy(Protocol): name: MaybeEmpty[str] url: MaybeEmpty[str] + class _EmbedAuthorProxy(Protocol): name: MaybeEmpty[str] url: MaybeEmpty[str] @@ -175,15 +181,15 @@ class Embed: Empty: Final = EmptyEmbed def __init__( - self, - *, - colour: Union[int, Colour, _EmptyEmbed] = EmptyEmbed, - color: Union[int, Colour, _EmptyEmbed] = EmptyEmbed, - title: MaybeEmpty[Any] = EmptyEmbed, - type: EmbedType = 'rich', - url: MaybeEmpty[Any] = EmptyEmbed, - description: MaybeEmpty[Any] = EmptyEmbed, - timestamp: datetime.datetime = None, + self, + *, + colour: Union[int, Colour, _EmptyEmbed] = EmptyEmbed, + color: Union[int, Colour, _EmptyEmbed] = EmptyEmbed, + title: MaybeEmpty[Any] = EmptyEmbed, + type: EmbedType = 'rich', + url: MaybeEmpty[Any] = EmptyEmbed, + description: MaybeEmpty[Any] = EmptyEmbed, + timestamp: datetime.datetime = None, ): self.colour = colour if colour is not EmptyEmbed else color @@ -205,7 +211,7 @@ class Embed: self.timestamp = timestamp @classmethod - def from_dict(cls: Type[E], data: EmbedData) -> E: + def from_dict(cls: Type[E], data: Mapping[str, Any]) -> E: """Converts a :class:`dict` to a :class:`Embed` provided it is in the format that Discord expects it to be in. @@ -366,7 +372,7 @@ class Embed: self._footer['icon_url'] = str(icon_url) return self - + def remove_footer(self: E) -> E: """Clears embed's footer information. @@ -381,7 +387,7 @@ class Embed: pass return self - + @property def image(self) -> _EmbedMediaProxy: """Returns an ``EmbedProxy`` denoting the image contents. @@ -397,6 +403,19 @@ class Embed: """ return EmbedProxy(getattr(self, '_image', {})) # type: ignore + @image.setter + def image(self: E, *, url: Any): + self._image = { + 'url': str(url), + } + + @image.deleter + def image(self: E): + try: + del self._image + except AttributeError: + pass + def set_image(self: E, *, url: MaybeEmpty[Any]) -> E: """Sets the image for the embed content. @@ -413,14 +432,9 @@ class Embed: """ if url is EmptyEmbed: - try: - del self._image - except AttributeError: - pass + del self.image else: - self._image = { - 'url': str(url), - } + self.image = url return self @@ -439,7 +453,25 @@ class Embed: """ return EmbedProxy(getattr(self, '_thumbnail', {})) # type: ignore - def set_thumbnail(self: E, *, url: MaybeEmpty[Any]) -> E: + @thumbnail.setter + def thumbnail(self: E, *, url: Any): + """Sets the thumbnail for the embed content. + """ + + self._thumbnail = { + 'url': str(url), + } + + return + + @thumbnail.deleter + def thumbnail(self): + try: + del self.thumbnail + except AttributeError: + pass + + def set_thumbnail(self: E, *, url: MaybeEmpty[Any]): """Sets the thumbnail for the embed content. This function returns the class instance to allow for fluent-style @@ -453,16 +485,10 @@ class Embed: url: :class:`str` The source URL for the thumbnail. Only HTTP(S) is supported. """ - if url is EmptyEmbed: - try: - del self._thumbnail - except AttributeError: - pass + del self.thumbnail else: - self._thumbnail = { - 'url': str(url), - } + self.thumbnail = url return self diff --git a/discord/emoji.py b/discord/emoji.py index 0630bdcd..39fa0218 100644 --- a/discord/emoji.py +++ b/discord/emoji.py @@ -72,6 +72,10 @@ class Emoji(_EmojiTag, AssetMixin): Returns the emoji rendered for discord. + .. describe:: int(x) + + Returns the emoji ID. + Attributes ----------- name: :class:`str` @@ -137,6 +141,9 @@ class Emoji(_EmojiTag, AssetMixin): return f'' return f'<:{self.name}:{self.id}>' + def __int__(self) -> int: + return self.id + def __repr__(self) -> str: return f'' @@ -212,7 +219,7 @@ class Emoji(_EmojiTag, AssetMixin): await self._state.http.delete_custom_emoji(self.guild.id, self.id, reason=reason) - async def edit(self, *, name: str = MISSING, roles: List[Snowflake] = MISSING, reason: Optional[str] = None) -> None: + async def edit(self, *, name: str = MISSING, roles: List[Snowflake] = MISSING, reason: Optional[str] = None) -> Emoji: r"""|coro| Edits the custom emoji. @@ -220,6 +227,9 @@ class Emoji(_EmojiTag, AssetMixin): You must have :attr:`~Permissions.manage_emojis` permission to do this. + .. versionchanged:: 2.0 + The newly updated emoji is returned. + Parameters ----------- name: :class:`str` @@ -235,6 +245,11 @@ class Emoji(_EmojiTag, AssetMixin): You are not allowed to edit emojis. HTTPException An error occurred editing the emoji. + + Returns + -------- + :class:`Emoji` + The newly updated emoji. """ payload = {} @@ -243,4 +258,5 @@ class Emoji(_EmojiTag, AssetMixin): if roles is not MISSING: payload['roles'] = [role.id for role in roles] - await self._state.http.edit_custom_emoji(self.guild.id, self.id, payload=payload, reason=reason) + data = await self._state.http.edit_custom_emoji(self.guild.id, self.id, payload=payload, reason=reason) + return Emoji(guild=self.guild, data=data, state=self._state) diff --git a/discord/enums.py b/discord/enums.py index 4df39914..af8ee2b0 100644 --- a/discord/enums.py +++ b/discord/enums.py @@ -46,6 +46,7 @@ __all__ = ( 'ExpireBehaviour', 'ExpireBehavior', 'StickerType', + 'StickerFormatType', 'InviteTarget', 'VideoQualityMode', 'ComponentType', @@ -57,13 +58,17 @@ __all__ = ( ) -def _create_value_cls(name): +def _create_value_cls(name, comparable): cls = namedtuple('_EnumValue_' + name, 'name value') cls.__repr__ = lambda self: f'<{name}.{self.name}: {self.value!r}>' cls.__str__ = lambda self: f'{name}.{self.name}' + if comparable: + cls.__le__ = lambda self, other: isinstance(other, self.__class__) and self.value <= other.value + cls.__ge__ = lambda self, other: isinstance(other, self.__class__) and self.value >= other.value + cls.__lt__ = lambda self, other: isinstance(other, self.__class__) and self.value < other.value + cls.__gt__ = lambda self, other: isinstance(other, self.__class__) and self.value > other.value return cls - def _is_descriptor(obj): return hasattr(obj, '__get__') or hasattr(obj, '__set__') or hasattr(obj, '__delete__') @@ -75,12 +80,12 @@ class EnumMeta(type): _enum_member_map_: ClassVar[Dict[str, Any]] _enum_value_map_: ClassVar[Dict[Any, Any]] - def __new__(cls, name, bases, attrs): + def __new__(cls, name, bases, attrs, *, comparable: bool = False): value_mapping = {} member_mapping = {} member_names = [] - value_cls = _create_value_cls(name) + value_cls = _create_value_cls(name, comparable) for key, value in list(attrs.items()): is_descriptor = _is_descriptor(value) if key[0] == '_' and not is_descriptor: @@ -251,7 +256,7 @@ class SpeakingState(Enum): return self.value -class VerificationLevel(Enum): +class VerificationLevel(Enum, comparable=True): none = 0 low = 1 medium = 2 @@ -262,7 +267,7 @@ class VerificationLevel(Enum): return self.name -class ContentFilter(Enum): +class ContentFilter(Enum, comparable=True): disabled = 0 no_role = 1 all_members = 2 @@ -295,7 +300,7 @@ class DefaultAvatar(Enum): return self.name -class NotificationLevel(Enum): +class NotificationLevel(Enum, comparable=True): all_messages = 0 only_mentions = 1 @@ -346,6 +351,12 @@ class AuditLogAction(Enum): stage_instance_create = 83 stage_instance_update = 84 stage_instance_delete = 85 + sticker_create = 90 + sticker_update = 91 + sticker_delete = 92 + thread_create = 110 + thread_update = 111 + thread_delete = 112 # fmt: on @property @@ -390,6 +401,12 @@ class AuditLogAction(Enum): AuditLogAction.stage_instance_create: AuditLogActionCategory.create, AuditLogAction.stage_instance_update: AuditLogActionCategory.update, AuditLogAction.stage_instance_delete: AuditLogActionCategory.delete, + AuditLogAction.sticker_create: AuditLogActionCategory.create, + AuditLogAction.sticker_update: AuditLogActionCategory.update, + AuditLogAction.sticker_delete: AuditLogActionCategory.delete, + AuditLogAction.thread_create: AuditLogActionCategory.create, + AuditLogAction.thread_update: AuditLogActionCategory.update, + AuditLogAction.thread_delete: AuditLogActionCategory.delete, } # fmt: on return lookup[self] @@ -421,6 +438,10 @@ class AuditLogAction(Enum): return 'integration' elif v < 90: return 'stage_instance' + elif v < 93: + return 'sticker' + elif v < 113: + return 'thread' class UserFlags(Enum): @@ -476,10 +497,26 @@ ExpireBehavior = ExpireBehaviour class StickerType(Enum): + standard = 1 + guild = 2 + + +class StickerFormatType(Enum): png = 1 apng = 2 lottie = 3 + @property + def file_extension(self) -> str: + # fmt: off + lookup: Dict[StickerFormatType, str] = { + StickerFormatType.png: 'png', + StickerFormatType.apng: 'png', + StickerFormatType.lottie: 'json', + } + # fmt: on + return lookup[self] + class InviteTarget(Enum): unknown = 0 @@ -545,7 +582,7 @@ class StagePrivacyLevel(Enum): guild_only = 2 -class NSFWLevel(Enum): +class NSFWLevel(Enum, comparable=True): default = 0 explicit = 1 safe = 2 diff --git a/discord/errors.py b/discord/errors.py index 398cdc55..bc2398d5 100644 --- a/discord/errors.py +++ b/discord/errors.py @@ -31,9 +31,9 @@ if TYPE_CHECKING: try: from requests import Response - ResponseType = Union[ClientResponse, Response] + _ResponseType = Union[ClientResponse, Response] except ModuleNotFoundError: - ResponseType = ClientResponse + _ResponseType = ClientResponse from .interactions import Interaction @@ -123,8 +123,8 @@ class HTTPException(DiscordException): The Discord specific error code for the failure. """ - def __init__(self, response: ResponseType, message: Optional[Union[str, Dict[str, Any]]]): - self.response: ResponseType = response + def __init__(self, response: _ResponseType, message: Optional[Union[str, Dict[str, Any]]]): + self.response: _ResponseType = response self.status: int = response.status # type: ignore self.code: int self.text: str diff --git a/discord/ext/commands/_types.py b/discord/ext/commands/_types.py index 8c3c53a2..9b155987 100644 --- a/discord/ext/commands/_types.py +++ b/discord/ext/commands/_types.py @@ -22,6 +22,26 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ + +from typing import Any, Callable, Coroutine, TYPE_CHECKING, TypeVar, Union + + +if TYPE_CHECKING: + from .context import Context + from .cog import Cog + from .errors import CommandError + +T = TypeVar('T') + +Coro = Coroutine[Any, Any, T] +MaybeCoro = Union[T, Coro[T]] +CoroFunc = Callable[..., Coro[Any]] + +Check = Union[Callable[["Cog", "Context[Any]"], MaybeCoro[bool]], Callable[["Context[Any]"], MaybeCoro[bool]]] +Hook = Union[Callable[["Cog", "Context[Any]"], Coro[Any]], Callable[["Context[Any]"], Coro[Any]]] +Error = Union[Callable[["Cog", "Context[Any]", "CommandError"], Coro[Any]], Callable[["Context[Any]", "CommandError"], Coro[Any]]] + + # This is merely a tag type to avoid circular import issues. # Yes, this is a terrible solution but ultimately it is the only solution. class _BaseCommand: diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index cba7d1e0..c089b87d 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -22,13 +22,18 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + + import asyncio import collections +import collections.abc import inspect import importlib.util import sys import traceback import types +from typing import Any, Callable, Mapping, List, Dict, TYPE_CHECKING, Optional, TypeVar, Type, Union import discord @@ -39,6 +44,15 @@ from . import errors from .help import HelpCommand, DefaultHelpCommand from .cog import Cog +if TYPE_CHECKING: + import importlib.machinery + + from discord.message import Message + from ._types import ( + Check, + CoroFunc, + ) + __all__ = ( 'when_mentioned', 'when_mentioned_or', @@ -46,14 +60,21 @@ __all__ = ( 'AutoShardedBot', ) -def when_mentioned(bot, msg): +MISSING: Any = discord.utils.MISSING + +T = TypeVar('T') +CFT = TypeVar('CFT', bound='CoroFunc') +CXT = TypeVar('CXT', bound='Context') + +def when_mentioned(bot: Union[Bot, AutoShardedBot], msg: Message) -> List[str]: """A callable that implements a command prefix equivalent to being mentioned. These are meant to be passed into the :attr:`.Bot.command_prefix` attribute. """ - return [f'<@{bot.user.id}> ', f'<@!{bot.user.id}> '] + # bot.user will never be None when this is called + return [f'<@{bot.user.id}> ', f'<@!{bot.user.id}> '] # type: ignore -def when_mentioned_or(*prefixes): +def when_mentioned_or(*prefixes: str) -> Callable[[Union[Bot, AutoShardedBot], Message], List[str]]: """A callable that implements when mentioned or other prefixes provided. These are meant to be passed into the :attr:`.Bot.command_prefix` attribute. @@ -89,7 +110,7 @@ def when_mentioned_or(*prefixes): return inner -def _is_submodule(parent, child): +def _is_submodule(parent: str, child: str) -> bool: return parent == child or child.startswith(parent + ".") class _DefaultRepr: @@ -99,13 +120,13 @@ class _DefaultRepr: _default = _DefaultRepr() class BotBase(GroupMixin): - def __init__(self, command_prefix, help_command=_default, description=None, **options): - super().__init__(**options) + def __init__(self, command_prefix, help_command=_default, description=None, *, intents: discord.Intents, **options): + super().__init__(**options, intents=intents) self.command_prefix = command_prefix - self.extra_events = {} - self.__cogs = {} - self.__extensions = {} - self._checks = [] + self.extra_events: Dict[str, List[CoroFunc]] = {} + self.__cogs: Dict[str, Cog] = {} + self.__extensions: Dict[str, types.ModuleType] = {} + self._checks: List[Check] = [] self._check_once = [] self._before_invoke = None self._after_invoke = None @@ -128,13 +149,15 @@ class BotBase(GroupMixin): # internal helpers - def dispatch(self, event_name, *args, **kwargs): - super().dispatch(event_name, *args, **kwargs) + def dispatch(self, event_name: str, *args: Any, **kwargs: Any) -> None: + # super() will resolve to Client + super().dispatch(event_name, *args, **kwargs) # type: ignore ev = 'on_' + event_name for event in self.extra_events.get(ev, []): - self._schedule_event(event, ev, *args, **kwargs) + self._schedule_event(event, ev, *args, **kwargs) # type: ignore - async def close(self): + @discord.utils.copy_doc(discord.Client.close) + async def close(self) -> None: for extension in tuple(self.__extensions): try: self.unload_extension(extension) @@ -147,9 +170,9 @@ class BotBase(GroupMixin): except Exception: pass - await super().close() + await super().close() # type: ignore - async def on_command_error(self, context, exception): + async def on_command_error(self, context: Context, exception: errors.CommandError) -> None: """|coro| The default command error handler provided by the bot. @@ -175,7 +198,7 @@ class BotBase(GroupMixin): # global check registration - def check(self, func): + def check(self, func: T) -> T: r"""A decorator that adds a global check to the bot. A global check is similar to a :func:`.check` that is applied @@ -200,10 +223,11 @@ class BotBase(GroupMixin): return ctx.command.qualified_name in allowed_commands """ - self.add_check(func) + # T was used instead of Check to ensure the type matches on return + self.add_check(func) # type: ignore return func - def add_check(self, func, *, call_once=False): + def add_check(self, func: Check, *, call_once: bool = False) -> None: """Adds a global check to the bot. This is the non-decorator interface to :meth:`.check` @@ -223,7 +247,7 @@ class BotBase(GroupMixin): else: self._checks.append(func) - def remove_check(self, func, *, call_once=False): + def remove_check(self, func: Check, *, call_once: bool = False) -> None: """Removes a global check from the bot. This function is idempotent and will not raise an exception @@ -244,7 +268,7 @@ class BotBase(GroupMixin): except ValueError: pass - def check_once(self, func): + def check_once(self, func: CFT) -> CFT: r"""A decorator that adds a "call once" global check to the bot. Unlike regular global checks, this one is called only once @@ -282,15 +306,16 @@ class BotBase(GroupMixin): self.add_check(func, call_once=True) return func - async def can_run(self, ctx, *, call_once=False): + async def can_run(self, ctx: Context, *, call_once: bool = False) -> bool: data = self._check_once if call_once else self._checks if len(data) == 0: return True - return await discord.utils.async_all(f(ctx) for f in data) + # type-checker doesn't distinguish between functions and methods + return await discord.utils.async_all(f(ctx) for f in data) # type: ignore - async def is_owner(self, user): + async def is_owner(self, user: discord.User) -> bool: """|coro| Checks if a :class:`~discord.User` or :class:`~discord.Member` is the owner of @@ -319,7 +344,8 @@ class BotBase(GroupMixin): elif self.owner_ids: return user.id in self.owner_ids else: - app = await self.application_info() + + app = await self.application_info() # type: ignore if app.team: self.owner_ids = ids = {m.id for m in app.team.members} return user.id in ids @@ -327,7 +353,7 @@ class BotBase(GroupMixin): self.owner_id = owner_id = app.owner.id return user.id == owner_id - def before_invoke(self, coro): + def before_invoke(self, coro: CFT) -> CFT: """A decorator that registers a coroutine as a pre-invoke hook. A pre-invoke hook is called directly before the command is @@ -359,7 +385,7 @@ class BotBase(GroupMixin): self._before_invoke = coro return coro - def after_invoke(self, coro): + def after_invoke(self, coro: CFT) -> CFT: r"""A decorator that registers a coroutine as a post-invoke hook. A post-invoke hook is called directly after the command is @@ -394,14 +420,14 @@ class BotBase(GroupMixin): # listener registration - def add_listener(self, func, name=None): + def add_listener(self, func: CoroFunc, name: str = MISSING) -> None: """The non decorator alternative to :meth:`.listen`. Parameters ----------- func: :ref:`coroutine ` The function to call. - name: Optional[:class:`str`] + name: :class:`str` The name of the event to listen for. Defaults to ``func.__name__``. Example @@ -416,7 +442,7 @@ class BotBase(GroupMixin): bot.add_listener(my_message, 'on_message') """ - name = func.__name__ if name is None else name + name = func.__name__ if name is MISSING else name if not asyncio.iscoroutinefunction(func): raise TypeError('Listeners must be coroutines') @@ -426,7 +452,7 @@ class BotBase(GroupMixin): else: self.extra_events[name] = [func] - def remove_listener(self, func, name=None): + def remove_listener(self, func: CoroFunc, name: str = MISSING) -> None: """Removes a listener from the pool of listeners. Parameters @@ -438,7 +464,7 @@ class BotBase(GroupMixin): ``func.__name__``. """ - name = func.__name__ if name is None else name + name = func.__name__ if name is MISSING else name if name in self.extra_events: try: @@ -446,7 +472,7 @@ class BotBase(GroupMixin): except ValueError: pass - def listen(self, name=None): + def listen(self, name: str = MISSING) -> Callable[[CFT], CFT]: """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` @@ -476,7 +502,7 @@ class BotBase(GroupMixin): The function being listened to is not a coroutine. """ - def decorator(func): + def decorator(func: CFT) -> CFT: self.add_listener(func, name) return func @@ -528,7 +554,7 @@ class BotBase(GroupMixin): cog = cog._inject(self) self.__cogs[cog_name] = cog - def get_cog(self, name): + def get_cog(self, name: str) -> Optional[Cog]: """Gets the cog instance requested. If the cog is not found, ``None`` is returned instead. @@ -547,8 +573,8 @@ class BotBase(GroupMixin): """ return self.__cogs.get(name) - def remove_cog(self, name): - """Removes a cog from the bot. + def remove_cog(self, name: str) -> Optional[Cog]: + """Removes a cog from the bot and returns it. All registered commands and event listeners that the cog has registered will be removed as well. @@ -559,6 +585,11 @@ class BotBase(GroupMixin): ----------- name: :class:`str` The name of the cog to remove. + + Returns + ------- + Optional[:class:`.Cog`] + The cog that was removed. ``None`` if not found. """ cog = self.__cogs.pop(name, None) @@ -570,14 +601,16 @@ class BotBase(GroupMixin): help_command.cog = None cog._eject(self) + return cog + @property - def cogs(self): + def cogs(self) -> Mapping[str, Cog]: """Mapping[:class:`str`, :class:`Cog`]: A read-only mapping of cog name to cog.""" return types.MappingProxyType(self.__cogs) # extensions - def _remove_module_references(self, name): + def _remove_module_references(self, name: str) -> None: # find all references to the module # remove the cogs registered from the module for cogname, cog in self.__cogs.copy().items(): @@ -601,7 +634,7 @@ class BotBase(GroupMixin): for index in reversed(remove): del event_list[index] - def _call_module_finalizers(self, lib, key): + def _call_module_finalizers(self, lib: types.ModuleType, key: str) -> None: try: func = getattr(lib, 'teardown') except AttributeError: @@ -619,12 +652,12 @@ class BotBase(GroupMixin): if _is_submodule(name, module): del sys.modules[module] - def _load_from_module_spec(self, spec, key): + def _load_from_module_spec(self, spec: importlib.machinery.ModuleSpec, key: str) -> None: # precondition: key not in self.__extensions lib = importlib.util.module_from_spec(spec) sys.modules[key] = lib try: - spec.loader.exec_module(lib) + spec.loader.exec_module(lib) # type: ignore except Exception as e: del sys.modules[key] raise errors.ExtensionFailed(key, e) from e @@ -645,13 +678,13 @@ class BotBase(GroupMixin): else: self.__extensions[key] = lib - def _resolve_name(self, name, package): + def _resolve_name(self, name: str, package: Optional[str]) -> str: try: return importlib.util.resolve_name(name, package) except ImportError: raise errors.ExtensionNotFound(name) - def load_extension(self, name, *, package=None): + def load_extension(self, name: str, *, package: Optional[str] = None) -> None: """Loads an extension. An extension is a python module that contains commands, cogs, or @@ -698,7 +731,7 @@ class BotBase(GroupMixin): self._load_from_module_spec(spec, name) - def unload_extension(self, name, *, package=None): + def unload_extension(self, name: str, *, package: Optional[str] = None) -> None: """Unloads an extension. When the extension is unloaded, all commands, listeners, and cogs are @@ -739,7 +772,7 @@ class BotBase(GroupMixin): self._remove_module_references(lib.__name__) self._call_module_finalizers(lib, name) - def reload_extension(self, name, *, package=None): + def reload_extension(self, name: str, *, package: Optional[str] = None) -> None: """Atomically reloads an extension. This replaces the extension with the same extension, only refreshed. This is @@ -795,7 +828,7 @@ class BotBase(GroupMixin): # if the load failed, the remnants should have been # cleaned from the load_extension function call # so let's load it from our old compiled library. - lib.setup(self) + lib.setup(self) # type: ignore self.__extensions[name] = lib # revert sys.modules back to normal and raise back to caller @@ -803,18 +836,18 @@ class BotBase(GroupMixin): raise @property - def extensions(self): + def extensions(self) -> Mapping[str, types.ModuleType]: """Mapping[:class:`str`, :class:`py:types.ModuleType`]: A read-only mapping of extension name to extension.""" return types.MappingProxyType(self.__extensions) # help command stuff @property - def help_command(self): + def help_command(self) -> Optional[HelpCommand]: return self._help_command @help_command.setter - def help_command(self, value): + def help_command(self, value: Optional[HelpCommand]) -> None: if value is not None: if not isinstance(value, HelpCommand): raise TypeError('help_command must be a subclass of HelpCommand') @@ -830,7 +863,7 @@ class BotBase(GroupMixin): # command processing - async def get_prefix(self, message): + async def get_prefix(self, message: Message) -> Union[List[str], str]: """|coro| Retrieves the prefix the bot is listening to @@ -868,7 +901,7 @@ class BotBase(GroupMixin): return ret - async def get_context(self, message, *, cls=Context): + async def get_context(self, message: Message, *, cls: Type[CXT] = Context) -> CXT: r"""|coro| Returns the invocation context from the message. @@ -901,7 +934,7 @@ class BotBase(GroupMixin): view = StringView(message.content) ctx = cls(prefix=None, view=view, bot=self, message=message) - if message.author.id == self.user.id: + if message.author.id == self.user.id: # type: ignore return ctx prefix = await self.get_prefix(message) @@ -938,11 +971,12 @@ class BotBase(GroupMixin): invoker = view.get_word() ctx.invoked_with = invoker - ctx.prefix = invoked_prefix + # type-checker fails to narrow invoked_prefix type. + ctx.prefix = invoked_prefix # type: ignore ctx.command = self.all_commands.get(invoker) return ctx - async def invoke(self, ctx): + async def invoke(self, ctx: Context) -> None: """|coro| Invokes the command given under the invocation context and @@ -968,7 +1002,7 @@ class BotBase(GroupMixin): exc = errors.CommandNotFound(f'Command "{ctx.invoked_with}" is not found') self.dispatch('command_error', ctx, exc) - async def process_commands(self, message): + async def process_commands(self, message: Message) -> None: """|coro| This function processes the commands that have been registered diff --git a/discord/ext/commands/cog.py b/discord/ext/commands/cog.py index da428cff..9931557d 100644 --- a/discord/ext/commands/cog.py +++ b/discord/ext/commands/cog.py @@ -21,15 +21,30 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations import inspect +import discord.utils + +from typing import Any, Callable, ClassVar, Dict, Generator, List, Optional, TYPE_CHECKING, Tuple, TypeVar, Type + from ._types import _BaseCommand +if TYPE_CHECKING: + from .bot import BotBase + from .context import Context + from .core import Command + __all__ = ( 'CogMeta', 'Cog', ) +CogT = TypeVar('CogT', bound='Cog') +FuncT = TypeVar('FuncT', bound=Callable[..., Any]) + +MISSING: Any = discord.utils.MISSING + class CogMeta(type): """A metaclass for defining a cog. @@ -89,8 +104,12 @@ class CogMeta(type): async def bar(self, ctx): pass # hidden -> False """ + __cog_name__: str + __cog_settings__: Dict[str, Any] + __cog_commands__: List[Command] + __cog_listeners__: List[Tuple[str, str]] - def __new__(cls, *args, **kwargs): + def __new__(cls: Type[CogMeta], *args: Any, **kwargs: Any) -> CogMeta: name, bases, attrs = args attrs['__cog_name__'] = kwargs.pop('name', name) attrs['__cog_settings__'] = kwargs.pop('command_attrs', {}) @@ -143,14 +162,14 @@ class CogMeta(type): new_cls.__cog_listeners__ = listeners_as_list return new_cls - def __init__(self, *args, **kwargs): + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args) @classmethod - def qualified_name(cls): + def qualified_name(cls) -> str: return cls.__cog_name__ -def _cog_special_method(func): +def _cog_special_method(func: FuncT) -> FuncT: func.__cog_special_method__ = None return func @@ -164,8 +183,12 @@ class Cog(metaclass=CogMeta): When inheriting from this class, the options shown in :class:`CogMeta` are equally valid here. """ + __cog_name__: ClassVar[str] + __cog_settings__: ClassVar[Dict[str, Any]] + __cog_commands__: ClassVar[List[Command]] + __cog_listeners__: ClassVar[List[Tuple[str, str]]] - def __new__(cls, *args, **kwargs): + def __new__(cls: Type[CogT], *args: Any, **kwargs: Any) -> CogT: # For issue 426, we need to store a copy of the command objects # since we modify them to inject `self` to them. # To do this, we need to interfere with the Cog creation process. @@ -173,7 +196,8 @@ class Cog(metaclass=CogMeta): cmd_attrs = cls.__cog_settings__ # Either update the command with the cog provided defaults or copy it. - self.__cog_commands__ = tuple(c._update_copy(cmd_attrs) for c in cls.__cog_commands__) + # r.e type ignore, type-checker complains about overriding a ClassVar + self.__cog_commands__ = tuple(c._update_copy(cmd_attrs) for c in cls.__cog_commands__) # type: ignore lookup = { cmd.qualified_name: cmd @@ -186,15 +210,15 @@ class Cog(metaclass=CogMeta): parent = command.parent if parent is not None: # Get the latest parent reference - parent = lookup[parent.qualified_name] + parent = lookup[parent.qualified_name] # type: ignore # Update our parent's reference to our self - parent.remove_command(command.name) - parent.add_command(command) + parent.remove_command(command.name) # type: ignore + parent.add_command(command) # type: ignore return self - def get_commands(self): + def get_commands(self) -> List[Command]: r""" Returns -------- @@ -209,20 +233,20 @@ class Cog(metaclass=CogMeta): return [c for c in self.__cog_commands__ if c.parent is None] @property - def qualified_name(self): + def qualified_name(self) -> str: """:class:`str`: Returns the cog's specified name, not the class name.""" return self.__cog_name__ @property - def description(self): + def description(self) -> str: """:class:`str`: Returns the cog's description, typically the cleaned docstring.""" return self.__cog_description__ @description.setter - def description(self, description): + def description(self, description: str) -> None: self.__cog_description__ = description - def walk_commands(self): + def walk_commands(self) -> Generator[Command, None, None]: """An iterator that recursively walks through this cog's commands and subcommands. Yields @@ -237,7 +261,7 @@ class Cog(metaclass=CogMeta): if isinstance(command, GroupMixin): yield from command.walk_commands() - def get_listeners(self): + def get_listeners(self) -> List[Tuple[str, Callable[..., Any]]]: """Returns a :class:`list` of (name, function) listener pairs that are defined in this cog. Returns @@ -248,12 +272,12 @@ class Cog(metaclass=CogMeta): return [(name, getattr(self, method_name)) for name, method_name in self.__cog_listeners__] @classmethod - def _get_overridden_method(cls, method): + def _get_overridden_method(cls, method: FuncT) -> Optional[FuncT]: """Return None if the method is not overridden. Otherwise returns the overridden method.""" return getattr(method.__func__, '__cog_special_method__', method) @classmethod - def listener(cls, name=None): + def listener(cls, name: str = MISSING) -> Callable[[FuncT], FuncT]: """A decorator that marks a function as a listener. This is the cog equivalent of :meth:`.Bot.listen`. @@ -271,10 +295,10 @@ class Cog(metaclass=CogMeta): the name. """ - if name is not None and not isinstance(name, str): + if name is not MISSING and not isinstance(name, str): raise TypeError(f'Cog.listener expected str but received {name.__class__.__name__!r} instead.') - def decorator(func): + def decorator(func: FuncT) -> FuncT: actual = func if isinstance(actual, staticmethod): actual = actual.__func__ @@ -293,7 +317,7 @@ class Cog(metaclass=CogMeta): return func return decorator - def has_error_handler(self): + def has_error_handler(self) -> bool: """:class:`bool`: Checks whether the cog has an error handler. .. versionadded:: 1.7 @@ -301,7 +325,7 @@ class Cog(metaclass=CogMeta): return not hasattr(self.cog_command_error.__func__, '__cog_special_method__') @_cog_special_method - def cog_unload(self): + def cog_unload(self) -> None: """A special method that is called when the cog gets removed. This function **cannot** be a coroutine. It must be a regular @@ -312,7 +336,7 @@ class Cog(metaclass=CogMeta): pass @_cog_special_method - def bot_check_once(self, ctx): + def bot_check_once(self, ctx: Context) -> bool: """A special method that registers as a :meth:`.Bot.check_once` check. @@ -322,7 +346,7 @@ class Cog(metaclass=CogMeta): return True @_cog_special_method - def bot_check(self, ctx): + def bot_check(self, ctx: Context) -> bool: """A special method that registers as a :meth:`.Bot.check` check. @@ -332,7 +356,7 @@ class Cog(metaclass=CogMeta): return True @_cog_special_method - def cog_check(self, ctx): + def cog_check(self, ctx: Context) -> bool: """A special method that registers as a :func:`~discord.ext.commands.check` for every command and subcommand in this cog. @@ -342,7 +366,7 @@ class Cog(metaclass=CogMeta): return True @_cog_special_method - async def cog_command_error(self, ctx, error): + async def cog_command_error(self, ctx: Context, error: Exception) -> None: """A special method that is called whenever an error is dispatched inside this cog. @@ -361,7 +385,7 @@ class Cog(metaclass=CogMeta): pass @_cog_special_method - async def cog_before_invoke(self, ctx): + async def cog_before_invoke(self, ctx: Context) -> None: """A special method that acts as a cog local pre-invoke hook. This is similar to :meth:`.Command.before_invoke`. @@ -376,7 +400,7 @@ class Cog(metaclass=CogMeta): pass @_cog_special_method - async def cog_after_invoke(self, ctx): + async def cog_after_invoke(self, ctx: Context) -> None: """A special method that acts as a cog local post-invoke hook. This is similar to :meth:`.Command.after_invoke`. @@ -390,7 +414,7 @@ class Cog(metaclass=CogMeta): """ pass - def _inject(self, bot): + def _inject(self: CogT, bot: BotBase) -> CogT: cls = self.__class__ # realistically, the only thing that can cause loading errors @@ -425,7 +449,7 @@ class Cog(metaclass=CogMeta): return self - def _eject(self, bot): + def _eject(self, bot: BotBase) -> None: cls = self.__class__ try: diff --git a/discord/ext/commands/context.py b/discord/ext/commands/context.py index c5367c24..38a24d1d 100644 --- a/discord/ext/commands/context.py +++ b/discord/ext/commands/context.py @@ -21,16 +21,52 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + +import inspect +import re + +from typing import Any, Dict, Generic, List, Optional, TYPE_CHECKING, TypeVar, Union import discord.abc import discord.utils -import re + +from discord.message import Message + +if TYPE_CHECKING: + from typing_extensions import ParamSpec + + from discord.abc import MessageableChannel + from discord.guild import Guild + from discord.member import Member + from discord.state import ConnectionState + from discord.user import ClientUser, User + from discord.voice_client import VoiceProtocol + + from .bot import Bot, AutoShardedBot + from .cog import Cog + from .core import Command + from .help import HelpCommand + from .view import StringView __all__ = ( 'Context', ) -class Context(discord.abc.Messageable): +MISSING: Any = discord.utils.MISSING + + +T = TypeVar('T') +BotT = TypeVar('BotT', bound="Union[Bot, AutoShardedBot]") +CogT = TypeVar('CogT', bound="Cog") + +if TYPE_CHECKING: + P = ParamSpec('P') +else: + P = TypeVar('P') + + +class Context(discord.abc.Messageable, Generic[BotT]): r"""Represents the context in which a command is being invoked under. This class contains a lot of meta data to help you understand more about @@ -58,11 +94,11 @@ class Context(discord.abc.Messageable): This is only of use for within converters. .. versionadded:: 2.0 - prefix: :class:`str` + prefix: Optional[:class:`str`] The prefix that was used to invoke the command. - command: :class:`Command` + command: Optional[:class:`Command`] The command that is being invoked currently. - invoked_with: :class:`str` + invoked_with: Optional[:class:`str`] The command name that triggered this invocation. Useful for finding out which alias called the command. invoked_parents: List[:class:`str`] @@ -73,7 +109,7 @@ class Context(discord.abc.Messageable): .. versionadded:: 1.7 - invoked_subcommand: :class:`Command` + invoked_subcommand: Optional[:class:`Command`] The subcommand that was invoked. If no valid subcommand was invoked then this is equal to ``None``. subcommand_passed: Optional[:class:`str`] @@ -86,23 +122,38 @@ class Context(discord.abc.Messageable): or invoked. """ - def __init__(self, **attrs): - self.message = attrs.pop('message', None) - self.bot = attrs.pop('bot', None) - self.args = attrs.pop('args', []) - self.kwargs = attrs.pop('kwargs', {}) - self.prefix = attrs.pop('prefix') - self.command = attrs.pop('command', None) - self.view = attrs.pop('view', None) - self.invoked_with = attrs.pop('invoked_with', None) - self.invoked_parents = attrs.pop('invoked_parents', []) - self.invoked_subcommand = attrs.pop('invoked_subcommand', None) - self.subcommand_passed = attrs.pop('subcommand_passed', None) - self.command_failed = attrs.pop('command_failed', False) - self.current_parameter = attrs.pop('current_parameter', None) - self._state = self.message._state + def __init__(self, + *, + message: Message, + bot: BotT, + view: StringView, + args: List[Any] = MISSING, + kwargs: Dict[str, Any] = MISSING, + prefix: Optional[str] = None, + command: Optional[Command] = None, + invoked_with: Optional[str] = None, + invoked_parents: List[str] = MISSING, + invoked_subcommand: Optional[Command] = None, + subcommand_passed: Optional[str] = None, + command_failed: bool = False, + current_parameter: Optional[inspect.Parameter] = None, + ): + self.message: Message = message + self.bot: BotT = bot + self.args: List[Any] = args or [] + self.kwargs: Dict[str, Any] = kwargs or {} + self.prefix: Optional[str] = prefix + self.command: Optional[Command] = command + self.view: StringView = view + self.invoked_with: Optional[str] = invoked_with + self.invoked_parents: List[str] = invoked_parents or [] + self.invoked_subcommand: Optional[Command] = invoked_subcommand + self.subcommand_passed: Optional[str] = subcommand_passed + self.command_failed: bool = command_failed + self.current_parameter: Optional[inspect.Parameter] = current_parameter + self._state: ConnectionState = self.message._state - async def invoke(self, command, /, *args, **kwargs): + async def invoke(self, command: Command[CogT, P, T], /, *args: P.args, **kwargs: P.kwargs) -> T: r"""|coro| Calls a command with the arguments given. @@ -124,7 +175,7 @@ class Context(discord.abc.Messageable): command: :class:`.Command` The command that is going to be called. \*args - The arguments to to use. + The arguments to use. \*\*kwargs The keyword arguments to use. @@ -133,17 +184,9 @@ class Context(discord.abc.Messageable): TypeError The command argument to invoke is missing. """ - arguments = [] - if command.cog is not None: - arguments.append(command.cog) + return await command(self, *args, **kwargs) - arguments.append(self) - arguments.extend(args) - - ret = await command.callback(*arguments, **kwargs) - return ret - - async def reinvoke(self, *, call_hooks: bool = False, restart: bool = True): + async def reinvoke(self, *, call_hooks: bool = False, restart: bool = True) -> None: """|coro| Calls the command again. @@ -187,7 +230,7 @@ class Context(discord.abc.Messageable): if restart: to_call = cmd.root_parent or cmd - view.index = len(self.prefix) + view.index = len(self.prefix or '') view.previous = 0 self.invoked_parents = [] self.invoked_with = view.get_word() # advance to get the root command @@ -206,20 +249,23 @@ class Context(discord.abc.Messageable): self.subcommand_passed = subcommand_passed @property - def valid(self): + def valid(self) -> bool: """:class:`bool`: Checks if the invocation context is valid to be invoked with.""" return self.prefix is not None and self.command is not None - async def _get_channel(self): + async def _get_channel(self) -> discord.abc.Messageable: return self.channel @property - def clean_prefix(self): + def clean_prefix(self) -> str: """:class:`str`: The cleaned up invoke prefix. i.e. mentions are ``@name`` instead of ``<@id>``. .. versionadded:: 2.0 """ - user = self.guild.me if self.guild else self.bot.user + if self.prefix is None: + return '' + + user = self.me # this breaks if the prefix mention is not the bot itself but I # consider this to be an *incredibly* strange use case. I'd rather go # for this common use case rather than waste performance for the @@ -228,7 +274,7 @@ class Context(discord.abc.Messageable): return pattern.sub("@%s" % user.display_name.replace('\\', r'\\'), self.prefix) @property - def cog(self): + def cog(self) -> Optional[Cog]: """Optional[:class:`.Cog`]: Returns the cog associated with this context's command. None if it does not exist.""" if self.command is None: @@ -236,38 +282,39 @@ class Context(discord.abc.Messageable): return self.command.cog @discord.utils.cached_property - def guild(self): + def guild(self) -> Optional[Guild]: """Optional[:class:`.Guild`]: Returns the guild associated with this context's command. None if not available.""" return self.message.guild @discord.utils.cached_property - def channel(self): + def channel(self) -> MessageableChannel: """Union[:class:`.abc.Messageable`]: Returns the channel associated with this context's command. Shorthand for :attr:`.Message.channel`. """ return self.message.channel @discord.utils.cached_property - def author(self): + def author(self) -> Union[User, Member]: """Union[:class:`~discord.User`, :class:`.Member`]: Returns the author associated with this context's command. Shorthand for :attr:`.Message.author` """ return self.message.author @discord.utils.cached_property - def me(self): + def me(self) -> Union[Member, ClientUser]: """Union[:class:`.Member`, :class:`.ClientUser`]: Similar to :attr:`.Guild.me` except it may return the :class:`.ClientUser` in private message contexts. """ - return self.guild.me if self.guild is not None else self.bot.user + # bot.user will never be None at this point. + return self.guild.me if self.guild is not None else self.bot.user # type: ignore @property - def voice_client(self): + def voice_client(self) -> Optional[VoiceProtocol]: r"""Optional[:class:`.VoiceProtocol`]: A shortcut to :attr:`.Guild.voice_client`\, if applicable.""" g = self.guild return g.voice_client if g else None - async def send_help(self, *args): + async def send_help(self, *args: Any) -> Any: """send_help(entity=) |coro| @@ -319,12 +366,12 @@ class Context(discord.abc.Messageable): return None entity = args[0] - if entity is None: - return None - if isinstance(entity, str): entity = bot.get_cog(entity) or bot.get_command(entity) + if entity is None: + return None + try: entity.qualified_name except AttributeError: @@ -348,6 +395,6 @@ class Context(discord.abc.Messageable): except CommandError as e: await cmd.on_help_command_error(self, e) - @discord.utils.copy_doc(discord.Message.reply) - async def reply(self, content=None, **kwargs): + @discord.utils.copy_doc(Message.reply) + async def reply(self, content: Optional[str] = None, **kwargs: Any) -> Message: return await self.message.reply(content, **kwargs) diff --git a/discord/ext/commands/converter.py b/discord/ext/commands/converter.py index 740ca2f4..5740a188 100644 --- a/discord/ext/commands/converter.py +++ b/discord/ext/commands/converter.py @@ -74,6 +74,7 @@ __all__ = ( 'StoreChannelConverter', 'ThreadConverter', 'GuildChannelConverter', + 'GuildStickerConverter', 'clean_content', 'Greedy', 'run_converters', @@ -823,6 +824,45 @@ class PartialEmojiConverter(Converter[discord.PartialEmoji]): raise PartialEmojiConversionFailure(argument) +class GuildStickerConverter(IDConverter[discord.GuildSticker]): + """Converts to a :class:`~discord.GuildSticker`. + + All lookups are done for the local guild first, if available. If that lookup + fails, then it checks the client's global cache. + + The lookup strategy is as follows (in order): + + 1. Lookup by ID. + 3. Lookup by name + + .. versionadded:: 2.0 + """ + + async def convert(self, ctx: Context, argument: str) -> discord.GuildSticker: + match = self._get_id_match(argument) + result = None + bot = ctx.bot + guild = ctx.guild + + if match is None: + # Try to get the sticker by name. Try local guild first. + if guild: + result = discord.utils.get(guild.stickers, name=argument) + + if result is None: + result = discord.utils.get(bot.stickers, name=argument) + else: + sticker_id = int(match.group(1)) + + # Try to look up sticker by id. + result = bot.get_sticker(sticker_id) + + if result is None: + raise GuildStickerNotFound(argument) + + return result + + class clean_content(Converter[str]): """Converts the argument to mention scrubbed version of said content. @@ -1012,6 +1052,7 @@ CONVERTER_MAPPING: Dict[Type[Any], Any] = { discord.StoreChannel: StoreChannelConverter, discord.Thread: ThreadConverter, discord.abc.GuildChannel: GuildChannelConverter, + discord.GuildSticker: GuildStickerConverter, } diff --git a/discord/ext/commands/cooldowns.py b/discord/ext/commands/cooldowns.py index 6092909b..2e008aed 100644 --- a/discord/ext/commands/cooldowns.py +++ b/discord/ext/commands/cooldowns.py @@ -22,6 +22,10 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + + +from typing import Any, Callable, Deque, Dict, Optional, Type, TypeVar, TYPE_CHECKING from discord.enums import Enum import time import asyncio @@ -30,6 +34,9 @@ from collections import deque from ...abc import PrivateChannel from .errors import MaxConcurrencyReached +if TYPE_CHECKING: + from ...message import Message + __all__ = ( 'BucketType', 'Cooldown', @@ -38,6 +45,9 @@ __all__ = ( 'MaxConcurrency', ) +C = TypeVar('C', bound='CooldownMapping') +MC = TypeVar('MC', bound='MaxConcurrency') + class BucketType(Enum): default = 0 user = 1 @@ -47,7 +57,7 @@ class BucketType(Enum): category = 5 role = 6 - def get_key(self, msg): + def get_key(self, msg: Message) -> Any: if self is BucketType.user: return msg.author.id elif self is BucketType.guild: @@ -57,29 +67,52 @@ class BucketType(Enum): elif self is BucketType.member: return ((msg.guild and msg.guild.id), msg.author.id) elif self is BucketType.category: - return (msg.channel.category or msg.channel).id + return (msg.channel.category or msg.channel).id # type: ignore elif self is BucketType.role: # we return the channel id of a private-channel as there are only roles in guilds # and that yields the same result as for a guild with only the @everyone role # NOTE: PrivateChannel doesn't actually have an id attribute but we assume we are # recieving a DMChannel or GroupChannel which inherit from PrivateChannel and do - return (msg.channel if isinstance(msg.channel, PrivateChannel) else msg.author.top_role).id + return (msg.channel if isinstance(msg.channel, PrivateChannel) else msg.author.top_role).id # type: ignore - def __call__(self, msg): + def __call__(self, msg: Message) -> Any: return self.get_key(msg) class Cooldown: + """Represents a cooldown for a command. + + Attributes + ----------- + rate: :class:`int` + The total number of tokens available per :attr:`per` seconds. + per: :class:`float` + The length of the cooldown period in seconds. + """ + __slots__ = ('rate', 'per', '_window', '_tokens', '_last') - def __init__(self, rate, per): - self.rate = int(rate) - self.per = float(per) - self._window = 0.0 - self._tokens = self.rate - self._last = 0.0 + def __init__(self, rate: float, per: float) -> None: + self.rate: int = int(rate) + self.per: float = float(per) + self._window: float = 0.0 + self._tokens: int = self.rate + self._last: float = 0.0 - def get_tokens(self, current=None): + def get_tokens(self, current: Optional[float] = None) -> int: + """Returns the number of available tokens before rate limiting is applied. + + Parameters + ------------ + current: Optional[:class:`float`] + The time in seconds since Unix epoch to calculate tokens at. + If not supplied then :func:`time.time()` is used. + + Returns + -------- + :class:`int` + The number of tokens available before the cooldown is to be applied. + """ if not current: current = time.time() @@ -89,7 +122,20 @@ class Cooldown: tokens = self.rate return tokens - def get_retry_after(self, current=None): + def get_retry_after(self, current: Optional[float] = None) -> float: + """Returns the time in seconds until the cooldown will be reset. + + Parameters + ------------- + current: Optional[:class:`float`] + The current time in seconds since Unix epoch. + If not supplied, then :func:`time.time()` is used. + + Returns + ------- + :class:`float` + The number of seconds to wait before this cooldown will be reset. + """ current = current or time.time() tokens = self.get_tokens(current) @@ -98,7 +144,20 @@ class Cooldown: return 0.0 - def update_rate_limit(self, current=None): + def update_rate_limit(self, current: Optional[float] = None) -> Optional[float]: + """Updates the cooldown rate limit. + + Parameters + ------------- + current: Optional[:class:`float`] + The time in seconds since Unix epoch to update the rate limit at. + If not supplied, then :func:`time.time()` is used. + + Returns + ------- + Optional[:class:`float`] + The retry-after time in seconds if rate limited. + """ current = current or time.time() self._last = current @@ -115,46 +174,58 @@ class Cooldown: # we're not so decrement our tokens self._tokens -= 1 - def reset(self): + def reset(self) -> None: + """Reset the cooldown to its initial state.""" self._tokens = self.rate self._last = 0.0 - def copy(self): + def copy(self) -> Cooldown: + """Creates a copy of this cooldown. + + Returns + -------- + :class:`Cooldown` + A new instance of this cooldown. + """ return Cooldown(self.rate, self.per) - def __repr__(self): + def __repr__(self) -> str: return f'' class CooldownMapping: - def __init__(self, original, type): + def __init__( + self, + original: Optional[Cooldown], + type: Callable[[Message], Any], + ) -> None: if not callable(type): raise TypeError('Cooldown type must be a BucketType or callable') - self._cache = {} - self._cooldown = original - self._type = type + self._cache: Dict[Any, Cooldown] = {} + self._cooldown: Optional[Cooldown] = original + self._type: Callable[[Message], Any] = type - def copy(self): + def copy(self) -> CooldownMapping: ret = CooldownMapping(self._cooldown, self._type) ret._cache = self._cache.copy() return ret @property - def valid(self): + def valid(self) -> bool: return self._cooldown is not None @property - def type(self): + def type(self) -> Callable[[Message], Any]: return self._type @classmethod - def from_cooldown(cls, rate, per, type): + def from_cooldown(cls: Type[C], rate, per, type) -> C: return cls(Cooldown(rate, per), type) - def _bucket_key(self, msg): + def _bucket_key(self, msg: Message) -> Any: return self._type(msg) - def _verify_cache_integrity(self, current=None): + def _verify_cache_integrity(self, current: Optional[float] = None) -> None: # we want to delete all cache objects that haven't been used # in a cooldown window. e.g. if we have a command that has a # cooldown of 60s and it has not been used in 60s then that key should be deleted @@ -163,12 +234,12 @@ class CooldownMapping: for k in dead_keys: del self._cache[k] - def create_bucket(self, message): - return self._cooldown.copy() + def create_bucket(self, message: Message) -> Cooldown: + return self._cooldown.copy() # type: ignore - def get_bucket(self, message, current=None): + def get_bucket(self, message: Message, current: Optional[float] = None) -> Cooldown: if self._type is BucketType.default: - return self._cooldown + return self._cooldown # type: ignore self._verify_cache_integrity(current) key = self._bucket_key(message) @@ -181,26 +252,30 @@ class CooldownMapping: return bucket - def update_rate_limit(self, message, current=None): + def update_rate_limit(self, message: Message, current: Optional[float] = None) -> Optional[float]: bucket = self.get_bucket(message, current) return bucket.update_rate_limit(current) class DynamicCooldownMapping(CooldownMapping): - def __init__(self, factory, type): + def __init__( + self, + factory: Callable[[Message], Cooldown], + type: Callable[[Message], Any] + ) -> None: super().__init__(None, type) - self._factory = factory + self._factory: Callable[[Message], Cooldown] = factory - def copy(self): + def copy(self) -> DynamicCooldownMapping: ret = DynamicCooldownMapping(self._factory, self._type) ret._cache = self._cache.copy() return ret @property - def valid(self): + def valid(self) -> bool: return True - def create_bucket(self, message): + def create_bucket(self, message: Message) -> Cooldown: return self._factory(message) class _Semaphore: @@ -218,28 +293,28 @@ class _Semaphore: __slots__ = ('value', 'loop', '_waiters') - def __init__(self, number): - self.value = number - self.loop = asyncio.get_event_loop() - self._waiters = deque() + def __init__(self, number: int) -> None: + self.value: int = number + self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() + self._waiters: Deque[asyncio.Future] = deque() - def __repr__(self): + def __repr__(self) -> str: return f'<_Semaphore value={self.value} waiters={len(self._waiters)}>' - def locked(self): + def locked(self) -> bool: return self.value == 0 - def is_active(self): + def is_active(self) -> bool: return len(self._waiters) > 0 - def wake_up(self): + def wake_up(self) -> None: while self._waiters: future = self._waiters.popleft() if not future.done(): future.set_result(None) return - async def acquire(self, *, wait=False): + async def acquire(self, *, wait: bool = False) -> bool: if not wait and self.value <= 0: # signal that we're not acquiring return False @@ -258,18 +333,18 @@ class _Semaphore: self.value -= 1 return True - def release(self): + def release(self) -> None: self.value += 1 self.wake_up() class MaxConcurrency: __slots__ = ('number', 'per', 'wait', '_mapping') - def __init__(self, number, *, per, wait): - self._mapping = {} - self.per = per - self.number = number - self.wait = wait + def __init__(self, number: int, *, per: BucketType, wait: bool) -> None: + self._mapping: Dict[Any, _Semaphore] = {} + self.per: BucketType = per + self.number: int = number + self.wait: bool = wait if number <= 0: raise ValueError('max_concurrency \'number\' cannot be less than 1') @@ -277,16 +352,16 @@ class MaxConcurrency: if not isinstance(per, BucketType): raise TypeError(f'max_concurrency \'per\' must be of type BucketType not {type(per)!r}') - def copy(self): + def copy(self: MC) -> MC: return self.__class__(self.number, per=self.per, wait=self.wait) - def __repr__(self): + def __repr__(self) -> str: return f'' - def get_key(self, message): + def get_key(self, message: Message) -> Any: return self.per.get_key(message) - async def acquire(self, message): + async def acquire(self, message: Message) -> None: key = self.get_key(message) try: @@ -298,7 +373,7 @@ class MaxConcurrency: if not acquired: raise MaxConcurrencyReached(self.number, self.per) - async def release(self, message): + async def release(self, message: Message) -> None: # Technically there's no reason for this function to be async # But it might be more useful in the future key = self.get_key(message) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 586fb470..35b7e840 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -21,19 +21,29 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations from typing import ( Any, Callable, Dict, + Generator, + Generic, Literal, + List, + Optional, Union, + Set, + Tuple, + TypeVar, + Type, + TYPE_CHECKING, + overload, ) import asyncio import functools import inspect import datetime -import types import discord @@ -42,6 +52,22 @@ from .cooldowns import Cooldown, BucketType, CooldownMapping, MaxConcurrency, Dy from .converter import run_converters, get_converter, Greedy from ._types import _BaseCommand from .cog import Cog +from .context import Context + + +if TYPE_CHECKING: + from typing_extensions import Concatenate, ParamSpec, TypeGuard + + from discord.message import Message + + from ._types import ( + Coro, + CoroFunc, + Check, + Hook, + Error, + ) + __all__ = ( 'Command', @@ -70,6 +96,22 @@ __all__ = ( 'bot_has_guild_permissions' ) +MISSING: Any = discord.utils.MISSING + +T = TypeVar('T') +CogT = TypeVar('CogT', bound='Cog') +CommandT = TypeVar('CommandT', bound='Command') +ContextT = TypeVar('ContextT', bound='Context') +# CHT = TypeVar('CHT', bound='Check') +GroupT = TypeVar('GroupT', bound='Group') +HookT = TypeVar('HookT', bound='Hook') +ErrorT = TypeVar('ErrorT', bound='Error') + +if TYPE_CHECKING: + P = ParamSpec('P') +else: + P = TypeVar('P') + def unwrap_function(function: Callable[..., Any]) -> Callable[..., Any]: partial = functools.partial while True: @@ -160,7 +202,7 @@ class _CaseInsensitiveDict(dict): def __setitem__(self, k, v): super().__setitem__(k.casefold(), v) -class Command(_BaseCommand): +class Command(_BaseCommand, Generic[CogT, P, T]): r"""A class that implements the protocol for a bot text command. These are not created manually, instead they are created via the @@ -172,7 +214,7 @@ class Command(_BaseCommand): The name of the command. callback: :ref:`coroutine ` The coroutine that is executed when the command is called. - help: :class:`str` + help: Optional[:class:`str`] The long help text for the command. brief: Optional[:class:`str`] The short help text for the command. @@ -235,8 +277,9 @@ class Command(_BaseCommand): .. versionadded:: 2.0 """ + __original_kwargs__: Dict[str, Any] - def __new__(cls, *args, **kwargs): + def __new__(cls: Type[CommandT], *args: Any, **kwargs: Any) -> CommandT: # if you're wondering why this is done, it's because we need to ensure # we have a complete original copy of **kwargs even for classes that # mess with it by popping before delegating to the subclass __init__. @@ -252,16 +295,20 @@ class Command(_BaseCommand): self.__original_kwargs__ = kwargs.copy() return self - def __init__(self, func, **kwargs): + def __init__(self, func: Union[ + Callable[Concatenate[CogT, ContextT, P], Coro[T]], + Callable[Concatenate[ContextT, P], Coro[T]], + ], **kwargs: Any): if not asyncio.iscoroutinefunction(func): raise TypeError('Callback must be a coroutine.') - self.name = name = kwargs.get('name') or func.__name__ + name = kwargs.get('name') or func.__name__ if not isinstance(name, str): raise TypeError('Name of a command must be a string.') + self.name: str = name self.callback = func - self.enabled = kwargs.get('enabled', True) + self.enabled: bool = kwargs.get('enabled', True) help_doc = kwargs.get('help') if help_doc is not None: @@ -271,74 +318,85 @@ class Command(_BaseCommand): if isinstance(help_doc, bytes): help_doc = help_doc.decode('utf-8') - self.help = help_doc + self.help: Optional[str] = help_doc - self.brief = kwargs.get('brief') - self.usage = kwargs.get('usage') - self.rest_is_raw = kwargs.get('rest_is_raw', False) - self.aliases = kwargs.get('aliases', []) - self.extras = kwargs.get('extras', {}) + self.brief: Optional[str] = kwargs.get('brief') + self.usage: Optional[str] = kwargs.get('usage') + self.rest_is_raw: bool = kwargs.get('rest_is_raw', False) + self.aliases: Union[List[str], Tuple[str]] = kwargs.get('aliases', []) + self.extras: Dict[str, Any] = kwargs.get('extras', {}) if not isinstance(self.aliases, (list, tuple)): raise TypeError("Aliases of a command must be a list or a tuple of strings.") - self.description = inspect.cleandoc(kwargs.get('description', '')) - self.hidden = kwargs.get('hidden', False) + self.description: str = inspect.cleandoc(kwargs.get('description', '')) + self.hidden: bool = kwargs.get('hidden', False) try: checks = func.__commands_checks__ checks.reverse() except AttributeError: checks = kwargs.get('checks', []) - finally: - self.checks = checks + + self.checks: List[Check] = checks try: cooldown = func.__commands_cooldown__ except AttributeError: cooldown = kwargs.get('cooldown') - finally: - if cooldown is None: - self._buckets = CooldownMapping(cooldown, BucketType.default) - elif isinstance(cooldown, CooldownMapping): - self._buckets = cooldown + + if cooldown is None: + buckets = CooldownMapping(cooldown, BucketType.default) + elif isinstance(cooldown, CooldownMapping): + buckets = cooldown + else: + raise TypeError("Cooldown must be a an instance of CooldownMapping or None.") + self._buckets: CooldownMapping = buckets try: max_concurrency = func.__commands_max_concurrency__ except AttributeError: max_concurrency = kwargs.get('max_concurrency') - finally: - self._max_concurrency = max_concurrency - self.require_var_positional = kwargs.get('require_var_positional', False) - self.ignore_extra = kwargs.get('ignore_extra', True) - self.cooldown_after_parsing = kwargs.get('cooldown_after_parsing', False) - self.cog = None + self._max_concurrency: Optional[MaxConcurrency] = max_concurrency + + self.require_var_positional: bool = kwargs.get('require_var_positional', False) + self.ignore_extra: bool = kwargs.get('ignore_extra', True) + self.cooldown_after_parsing: bool = kwargs.get('cooldown_after_parsing', False) + self.cog: Optional[CogT] = None # bandaid for the fact that sometimes parent can be the bot instance parent = kwargs.get('parent') - self.parent = parent if isinstance(parent, _BaseCommand) else None + self.parent: Optional[GroupMixin] = parent if isinstance(parent, _BaseCommand) else None # type: ignore + self._before_invoke: Optional[Hook] = None try: before_invoke = func.__before_invoke__ except AttributeError: - self._before_invoke = None + pass else: self.before_invoke(before_invoke) + self._after_invoke: Optional[Hook] = None try: after_invoke = func.__after_invoke__ except AttributeError: - self._after_invoke = None + pass else: self.after_invoke(after_invoke) @property - def callback(self): + def callback(self) -> Union[ + Callable[Concatenate[CogT, Context, P], Coro[T]], + Callable[Concatenate[Context, P], Coro[T]], + ]: return self._callback @callback.setter - def callback(self, function): + def callback(self, function: Union[ + Callable[Concatenate[CogT, Context, P], Coro[T]], + Callable[Concatenate[Context, P], Coro[T]], + ]) -> None: self._callback = function unwrap = unwrap_function(function) self.module = unwrap.__module__ @@ -350,7 +408,7 @@ class Command(_BaseCommand): self.params = get_signature_parameters(function, globalns) - def add_check(self, func): + def add_check(self, func: Check) -> None: """Adds a check to the command. This is the non-decorator interface to :func:`.check`. @@ -365,7 +423,7 @@ class Command(_BaseCommand): self.checks.append(func) - def remove_check(self, func): + def remove_check(self, func: Check) -> None: """Removes a check from the command. This function is idempotent and will not raise an exception @@ -384,7 +442,7 @@ class Command(_BaseCommand): except ValueError: pass - def update(self, **kwargs): + def update(self, **kwargs: Any) -> None: """Updates :class:`Command` instance with updated attribute. This works similarly to the :func:`.command` decorator in terms @@ -393,7 +451,7 @@ class Command(_BaseCommand): """ self.__init__(self.callback, **dict(self.__original_kwargs__, **kwargs)) - async def __call__(self, *args, **kwargs): + async def __call__(self, context: Context, *args: P.args, **kwargs: P.kwargs) -> T: """|coro| Calls the internal callback that the command holds. @@ -407,11 +465,11 @@ class Command(_BaseCommand): .. versionadded:: 1.3 """ if self.cog is not None: - return await self.callback(self.cog, *args, **kwargs) + return await self.callback(self.cog, context, *args, **kwargs) # type: ignore else: - return await self.callback(*args, **kwargs) + return await self.callback(context, *args, **kwargs) # type: ignore - def _ensure_assignment_on_copy(self, other): + def _ensure_assignment_on_copy(self, other: CommandT) -> CommandT: other._before_invoke = self._before_invoke other._after_invoke = self._after_invoke if self.checks != other.checks: @@ -419,7 +477,8 @@ class Command(_BaseCommand): if self._buckets.valid and not other._buckets.valid: other._buckets = self._buckets.copy() if self._max_concurrency != other._max_concurrency: - other._max_concurrency = self._max_concurrency.copy() + # _max_concurrency won't be None at this point + other._max_concurrency = self._max_concurrency.copy() # type: ignore try: other.on_error = self.on_error @@ -427,7 +486,7 @@ class Command(_BaseCommand): pass return other - def copy(self): + def copy(self: CommandT) -> CommandT: """Creates a copy of this command. Returns @@ -438,7 +497,7 @@ class Command(_BaseCommand): ret = self.__class__(self.callback, **self.__original_kwargs__) return self._ensure_assignment_on_copy(ret) - def _update_copy(self, kwargs): + def _update_copy(self: CommandT, kwargs: Dict[str, Any]) -> CommandT: if kwargs: kw = kwargs.copy() kw.update(self.__original_kwargs__) @@ -447,7 +506,7 @@ class Command(_BaseCommand): else: return self.copy() - async def dispatch_error(self, ctx, error): + async def dispatch_error(self, ctx: Context, error: Exception) -> None: ctx.command_failed = True cog = self.cog try: @@ -470,7 +529,7 @@ class Command(_BaseCommand): finally: ctx.bot.dispatch('command_error', ctx, error) - async def transform(self, ctx, param): + async def transform(self, ctx: Context, param: inspect.Parameter) -> Any: required = param.default is param.empty converter = get_converter(param) consume_rest_is_special = param.kind == param.KEYWORD_ONLY and not self.rest_is_raw @@ -505,12 +564,20 @@ class Command(_BaseCommand): if consume_rest_is_special: argument = view.read_rest().strip() else: - argument = view.get_quoted_word() + try: + argument = view.get_quoted_word() + except ArgumentParsingError as exc: + if self._is_typing_optional(param.annotation): + view.index = previous + return None + else: + raise exc view.previous = previous - return await run_converters(ctx, converter, argument, param) + # type-checker fails to narrow argument + return await run_converters(ctx, converter, argument, param) # type: ignore - async def _transform_greedy_pos(self, ctx, param, required, converter): + async def _transform_greedy_pos(self, ctx: Context, param: inspect.Parameter, required: bool, converter: Any) -> Any: view = ctx.view result = [] while not view.eof: @@ -520,7 +587,7 @@ class Command(_BaseCommand): view.skip_ws() try: argument = view.get_quoted_word() - value = await run_converters(ctx, converter, argument, param) + value = await run_converters(ctx, converter, argument, param) # type: ignore except (CommandError, ArgumentParsingError): view.index = previous break @@ -531,12 +598,12 @@ class Command(_BaseCommand): return param.default return result - async def _transform_greedy_var_pos(self, ctx, param, converter): + async def _transform_greedy_var_pos(self, ctx: Context, param: inspect.Parameter, converter: Any) -> Any: view = ctx.view previous = view.index try: argument = view.get_quoted_word() - value = await run_converters(ctx, converter, argument, param) + value = await run_converters(ctx, converter, argument, param) # type: ignore except (CommandError, ArgumentParsingError): view.index = previous raise RuntimeError() from None # break loop @@ -567,7 +634,7 @@ class Command(_BaseCommand): return result @property - def full_parent_name(self): + def full_parent_name(self) -> str: """:class:`str`: Retrieves the fully qualified parent command name. This the base command name required to execute it. For example, @@ -575,14 +642,15 @@ class Command(_BaseCommand): """ entries = [] command = self - while command.parent is not None: - command = command.parent - entries.append(command.name) + # command.parent is type-hinted as GroupMixin some attributes are resolved via MRO + while command.parent is not None: # type: ignore + command = command.parent # type: ignore + entries.append(command.name) # type: ignore return ' '.join(reversed(entries)) @property - def parents(self): + def parents(self) -> List[Group]: """List[:class:`Group`]: Retrieves the parents of this command. If the command has no parents then it returns an empty :class:`list`. @@ -593,14 +661,14 @@ class Command(_BaseCommand): """ entries = [] command = self - while command.parent is not None: - command = command.parent + while command.parent is not None: # type: ignore + command = command.parent # type: ignore entries.append(command) return entries @property - def root_parent(self): + def root_parent(self) -> Optional[Group]: """Optional[:class:`Group`]: Retrieves the root parent of this command. If the command has no parents then it returns ``None``. @@ -612,7 +680,7 @@ class Command(_BaseCommand): return self.parents[-1] @property - def qualified_name(self): + def qualified_name(self) -> str: """:class:`str`: Retrieves the fully qualified command name. This is the full parent name with the command name as well. @@ -626,10 +694,10 @@ class Command(_BaseCommand): else: return self.name - def __str__(self): + def __str__(self) -> str: return self.qualified_name - async def _parse_arguments(self, ctx): + async def _parse_arguments(self, ctx: Context) -> None: ctx.args = [ctx] if self.cog is None else [self.cog, ctx] ctx.kwargs = {} args = ctx.args @@ -679,7 +747,7 @@ class Command(_BaseCommand): if not self.ignore_extra and not view.eof: raise TooManyArguments('Too many arguments passed to ' + self.qualified_name) - async def call_before_hooks(self, ctx): + async def call_before_hooks(self, ctx: Context) -> None: # now that we're done preparing we can call the pre-command hooks # first, call the command local hook: cog = self.cog @@ -689,9 +757,9 @@ class Command(_BaseCommand): # __self__ only exists for methods, not functions # however, if @command.before_invoke is used, it will be a function if instance: - await self._before_invoke(instance, ctx) + await self._before_invoke(instance, ctx) # type: ignore else: - await self._before_invoke(ctx) + await self._before_invoke(ctx) # type: ignore # call the cog local hook if applicable: if cog is not None: @@ -704,14 +772,14 @@ class Command(_BaseCommand): if hook is not None: await hook(ctx) - async def call_after_hooks(self, ctx): + async def call_after_hooks(self, ctx: Context) -> None: cog = self.cog if self._after_invoke is not None: instance = getattr(self._after_invoke, '__self__', cog) if instance: - await self._after_invoke(instance, ctx) + await self._after_invoke(instance, ctx) # type: ignore else: - await self._after_invoke(ctx) + await self._after_invoke(ctx) # type: ignore # call the cog local hook if applicable: if cog is not None: @@ -723,7 +791,7 @@ class Command(_BaseCommand): if hook is not None: await hook(ctx) - def _prepare_cooldowns(self, ctx): + def _prepare_cooldowns(self, ctx: Context) -> None: if self._buckets.valid: dt = ctx.message.edited_at or ctx.message.created_at current = dt.replace(tzinfo=datetime.timezone.utc).timestamp() @@ -731,16 +799,17 @@ class Command(_BaseCommand): if bucket is not None: retry_after = bucket.update_rate_limit(current) if retry_after: - raise CommandOnCooldown(bucket, retry_after, self._buckets.type) + raise CommandOnCooldown(bucket, retry_after, self._buckets.type) # type: ignore - async def prepare(self, ctx): + async def prepare(self, ctx: Context) -> None: ctx.command = self if not await self.can_run(ctx): raise CheckFailure(f'The check functions for command {self.qualified_name} failed.') if self._max_concurrency is not None: - await self._max_concurrency.acquire(ctx) + # For this application, context can be duck-typed as a Message + await self._max_concurrency.acquire(ctx) # type: ignore try: if self.cooldown_after_parsing: @@ -753,10 +822,10 @@ class Command(_BaseCommand): await self.call_before_hooks(ctx) except: if self._max_concurrency is not None: - await self._max_concurrency.release(ctx) + await self._max_concurrency.release(ctx) # type: ignore raise - def is_on_cooldown(self, ctx): + def is_on_cooldown(self, ctx: Context) -> bool: """Checks whether the command is currently on cooldown. Parameters @@ -777,7 +846,7 @@ class Command(_BaseCommand): current = dt.replace(tzinfo=datetime.timezone.utc).timestamp() return bucket.get_tokens(current) == 0 - def reset_cooldown(self, ctx): + def reset_cooldown(self, ctx: Context) -> None: """Resets the cooldown on this command. Parameters @@ -789,7 +858,7 @@ class Command(_BaseCommand): bucket = self._buckets.get_bucket(ctx.message) bucket.reset() - def get_cooldown_retry_after(self, ctx): + def get_cooldown_retry_after(self, ctx: Context) -> float: """Retrieves the amount of seconds before this command can be tried again. .. versionadded:: 1.4 @@ -813,7 +882,7 @@ class Command(_BaseCommand): return 0.0 - async def invoke(self, ctx): + async def invoke(self, ctx: Context) -> None: await self.prepare(ctx) # terminate the invoked_subcommand chain. @@ -824,7 +893,7 @@ class Command(_BaseCommand): injected = hooked_wrapped_callback(self, ctx, self.callback) await injected(*ctx.args, **ctx.kwargs) - async def reinvoke(self, ctx, *, call_hooks=False): + async def reinvoke(self, ctx: Context, *, call_hooks: bool = False) -> None: ctx.command = self await self._parse_arguments(ctx) @@ -833,7 +902,7 @@ class Command(_BaseCommand): ctx.invoked_subcommand = None try: - await self.callback(*ctx.args, **ctx.kwargs) + await self.callback(*ctx.args, **ctx.kwargs) # type: ignore except: ctx.command_failed = True raise @@ -841,7 +910,7 @@ class Command(_BaseCommand): if call_hooks: await self.call_after_hooks(ctx) - def error(self, coro): + def error(self, coro: ErrorT) -> ErrorT: """A decorator that registers a coroutine as a local error handler. A local error handler is an :func:`.on_command_error` event limited to @@ -862,17 +931,17 @@ class Command(_BaseCommand): if not asyncio.iscoroutinefunction(coro): raise TypeError('The error handler must be a coroutine.') - self.on_error = coro + self.on_error: Error = coro return coro - def has_error_handler(self): + def has_error_handler(self) -> bool: """:class:`bool`: Checks whether the command has an error handler registered. .. versionadded:: 1.7 """ return hasattr(self, 'on_error') - def before_invoke(self, coro): + def before_invoke(self, coro: HookT) -> HookT: """A decorator that registers a coroutine as a pre-invoke hook. A pre-invoke hook is called directly before the command is @@ -899,7 +968,7 @@ class Command(_BaseCommand): self._before_invoke = coro return coro - def after_invoke(self, coro): + def after_invoke(self, coro: HookT) -> HookT: """A decorator that registers a coroutine as a post-invoke hook. A post-invoke hook is called directly after the command is @@ -927,12 +996,12 @@ class Command(_BaseCommand): return coro @property - def cog_name(self): + def cog_name(self) -> Optional[str]: """Optional[:class:`str`]: The name of the cog this command belongs to, if any.""" return type(self.cog).__cog_name__ if self.cog is not None else None @property - def short_doc(self): + def short_doc(self) -> str: """:class:`str`: Gets the "short" documentation of a command. By default, this is the :attr:`.brief` attribute. @@ -945,11 +1014,11 @@ class Command(_BaseCommand): return self.help.split('\n', 1)[0] return '' - def _is_typing_optional(self, annotation): - return getattr(annotation, '__origin__', None) is Union and type(None) in annotation.__args__ + def _is_typing_optional(self, annotation: Union[T, Optional[T]]) -> TypeGuard[Optional[T]]: + return getattr(annotation, '__origin__', None) is Union and type(None) in annotation.__args__ # type: ignore @property - def signature(self): + def signature(self) -> str: """:class:`str`: Returns a POSIX-like signature useful for help command output.""" if self.usage is not None: return self.usage @@ -1002,7 +1071,7 @@ class Command(_BaseCommand): return ' '.join(result) - async def can_run(self, ctx): + async def can_run(self, ctx: Context) -> bool: """|coro| Checks if the command can be executed by checking all the predicates @@ -1052,11 +1121,11 @@ class Command(_BaseCommand): # since we have no checks, then we just return True. return True - return await discord.utils.async_all(predicate(ctx) for predicate in predicates) + return await discord.utils.async_all(predicate(ctx) for predicate in predicates) # type: ignore finally: ctx.command = original -class GroupMixin: +class GroupMixin(Generic[CogT]): """A mixin that implements common functionality for classes that behave similar to :class:`.Group` and are allowed to register commands. @@ -1068,24 +1137,24 @@ class GroupMixin: case_insensitive: :class:`bool` Whether the commands should be case insensitive. Defaults to ``False``. """ - def __init__(self, *args, **kwargs): + def __init__(self, *args: Any, **kwargs: Any) -> None: case_insensitive = kwargs.get('case_insensitive', False) - self.all_commands = _CaseInsensitiveDict() if case_insensitive else {} - self.case_insensitive = case_insensitive + self.all_commands: Dict[str, Command[CogT, Any, Any]] = _CaseInsensitiveDict() if case_insensitive else {} + self.case_insensitive: bool = case_insensitive super().__init__(*args, **kwargs) @property - def commands(self): + def commands(self) -> Set[Command[CogT, Any, Any]]: """Set[:class:`.Command`]: A unique set of commands without aliases that are registered.""" return set(self.all_commands.values()) - def recursively_remove_all_commands(self): + def recursively_remove_all_commands(self) -> None: for command in self.all_commands.copy().values(): if isinstance(command, GroupMixin): command.recursively_remove_all_commands() self.remove_command(command.name) - def add_command(self, command): + def add_command(self, command: Command[CogT, Any, Any]) -> None: """Adds a :class:`.Command` into the internal list of commands. This is usually not called, instead the :meth:`~.GroupMixin.command` or @@ -1123,7 +1192,7 @@ class GroupMixin: raise CommandRegistrationError(alias, alias_conflict=True) self.all_commands[alias] = command - def remove_command(self, name): + def remove_command(self, name: str) -> Optional[Command[CogT, Any, Any]]: """Remove a :class:`.Command` from the internal list of commands. @@ -1156,11 +1225,11 @@ class GroupMixin: # in the case of a CommandRegistrationError, an alias might conflict # with an already existing command. If this is the case, we want to # make sure the pre-existing command is not removed. - if cmd not in (None, command): + if cmd is not None and cmd != command: self.all_commands[alias] = cmd return command - def walk_commands(self): + def walk_commands(self) -> Generator[Command[CogT, Any, Any], None, None]: """An iterator that recursively walks through all commands and subcommands. .. versionchanged:: 1.4 @@ -1176,7 +1245,7 @@ class GroupMixin: if isinstance(command, GroupMixin): yield from command.walk_commands() - def get_command(self, name): + def get_command(self, name: str) -> Optional[Command[CogT, Any, Any]]: """Get a :class:`.Command` from the internal list of commands. @@ -1210,13 +1279,45 @@ class GroupMixin: for name in names[1:]: try: - obj = obj.all_commands[name] + obj = obj.all_commands[name] # type: ignore except (AttributeError, KeyError): return None return obj - def command(self, *args, **kwargs): + @overload + def command( + self, + name: str = ..., + cls: Type[Command[CogT, P, T]] = ..., + *args: Any, + **kwargs: Any, + ) -> Callable[ + [ + Union[ + Callable[Concatenate[CogT, ContextT, P], Coro[T]], + Callable[Concatenate[ContextT, P], Coro[T]], + ] + ], Command[CogT, P, T]]: + ... + + @overload + def command( + self, + name: str = ..., + cls: Type[CommandT] = ..., + *args: Any, + **kwargs: Any, + ) -> Callable[[Callable[Concatenate[ContextT, P], Coro[Any]]], CommandT]: + ... + + def command( + self, + name: str = MISSING, + cls: Type[CommandT] = MISSING, + *args: Any, + **kwargs: Any, + ) -> Callable[[Callable[Concatenate[ContextT, P], Coro[Any]]], CommandT]: """A shortcut decorator that invokes :func:`.command` and adds it to the internal command list via :meth:`~.GroupMixin.add_command`. @@ -1225,15 +1326,46 @@ class GroupMixin: Callable[..., :class:`Command`] A decorator that converts the provided method into a Command, adds it to the bot, then returns it. """ - def decorator(func): + def decorator(func: Callable[Concatenate[ContextT, P], Coro[Any]]) -> CommandT: kwargs.setdefault('parent', self) - result = command(*args, **kwargs)(func) + result = command(name=name, cls=cls, *args, **kwargs)(func) self.add_command(result) return result return decorator - def group(self, *args, **kwargs): + @overload + def group( + self, + name: str = ..., + cls: Type[Group[CogT, P, T]] = ..., + *args: Any, + **kwargs: Any, + ) -> Callable[[ + Union[ + Callable[Concatenate[CogT, ContextT, P], Coro[T]], + Callable[Concatenate[ContextT, P], Coro[T]] + ] + ], Group[CogT, P, T]]: + ... + + @overload + def group( + self, + name: str = ..., + cls: Type[GroupT] = ..., + *args: Any, + **kwargs: Any, + ) -> Callable[[Callable[Concatenate[ContextT, P], Coro[Any]]], GroupT]: + ... + + def group( + self, + name: str = MISSING, + cls: Type[GroupT] = MISSING, + *args: Any, + **kwargs: Any, + ) -> Callable[[Callable[Concatenate[ContextT, P], Coro[Any]]], GroupT]: """A shortcut decorator that invokes :func:`.group` and adds it to the internal command list via :meth:`~.GroupMixin.add_command`. @@ -1242,15 +1374,15 @@ class GroupMixin: Callable[..., :class:`Group`] A decorator that converts the provided method into a Group, adds it to the bot, then returns it. """ - def decorator(func): + def decorator(func: Callable[Concatenate[ContextT, P], Coro[Any]]) -> GroupT: kwargs.setdefault('parent', self) - result = group(*args, **kwargs)(func) + result = group(name=name, cls=cls, *args, **kwargs)(func) self.add_command(result) return result return decorator -class Group(GroupMixin, Command): +class Group(GroupMixin[CogT], Command[CogT, P, T]): """A class that implements a grouping protocol for commands to be executed as subcommands. @@ -1272,11 +1404,11 @@ class Group(GroupMixin, Command): Indicates if the group's commands should be case insensitive. Defaults to ``False``. """ - def __init__(self, *args, **attrs): - self.invoke_without_command = attrs.pop('invoke_without_command', False) + def __init__(self, *args: Any, **attrs: Any) -> None: + self.invoke_without_command: bool = attrs.pop('invoke_without_command', False) super().__init__(*args, **attrs) - def copy(self): + def copy(self: GroupT) -> GroupT: """Creates a copy of this :class:`Group`. Returns @@ -1287,9 +1419,9 @@ class Group(GroupMixin, Command): ret = super().copy() for cmd in self.commands: ret.add_command(cmd.copy()) - return ret + return ret # type: ignore - async def invoke(self, ctx): + async def invoke(self, ctx: Context) -> None: ctx.invoked_subcommand = None ctx.subcommand_passed = None early_invoke = not self.invoke_without_command @@ -1309,7 +1441,7 @@ class Group(GroupMixin, Command): injected = hooked_wrapped_callback(self, ctx, self.callback) await injected(*ctx.args, **ctx.kwargs) - ctx.invoked_parents.append(ctx.invoked_with) + ctx.invoked_parents.append(ctx.invoked_with) # type: ignore if trigger and ctx.invoked_subcommand: ctx.invoked_with = trigger @@ -1320,7 +1452,7 @@ class Group(GroupMixin, Command): view.previous = previous await super().invoke(ctx) - async def reinvoke(self, ctx, *, call_hooks=False): + async def reinvoke(self, ctx: Context, *, call_hooks: bool = False) -> None: ctx.invoked_subcommand = None early_invoke = not self.invoke_without_command if early_invoke: @@ -1341,7 +1473,7 @@ class Group(GroupMixin, Command): if early_invoke: try: - await self.callback(*ctx.args, **ctx.kwargs) + await self.callback(*ctx.args, **ctx.kwargs) # type: ignore except: ctx.command_failed = True raise @@ -1349,7 +1481,7 @@ class Group(GroupMixin, Command): if call_hooks: await self.call_after_hooks(ctx) - ctx.invoked_parents.append(ctx.invoked_with) + ctx.invoked_parents.append(ctx.invoked_with) # type: ignore if trigger and ctx.invoked_subcommand: ctx.invoked_with = trigger @@ -1362,7 +1494,48 @@ class Group(GroupMixin, Command): # Decorators -def command(name=None, cls=None, **attrs): +@overload +def command( + name: str = ..., + cls: Type[Command[CogT, P, T]] = ..., + **attrs: Any, +) -> Callable[ + [ + Union[ + Callable[Concatenate[CogT, ContextT, P], Coro[T]], + Callable[Concatenate[ContextT, P], Coro[T]], + ] + ] +, Command[CogT, P, T]]: + ... + +@overload +def command( + name: str = ..., + cls: Type[CommandT] = ..., + **attrs: Any, +) -> Callable[ + [ + Union[ + Callable[Concatenate[CogT, ContextT, P], Coro[Any]], + Callable[Concatenate[ContextT, P], Coro[Any]], + ] + ] +, CommandT]: + ... + +def command( + name: str = MISSING, + cls: Type[CommandT] = MISSING, + **attrs: Any +) -> Callable[ + [ + Union[ + Callable[Concatenate[ContextT, P], Coro[Any]], + Callable[Concatenate[CogT, ContextT, P], Coro[T]], + ] + ] +, Union[Command[CogT, P, T], CommandT]]: """A decorator that transforms a function into a :class:`.Command` or if called with :func:`.group`, :class:`.Group`. @@ -1392,17 +1565,61 @@ def command(name=None, cls=None, **attrs): TypeError If the function is not a coroutine or is already a command. """ - if cls is None: - cls = Command + if cls is MISSING: + cls = Command # type: ignore - def decorator(func): + def decorator(func: Union[ + Callable[Concatenate[ContextT, P], Coro[Any]], + Callable[Concatenate[CogT, ContextT, P], Coro[Any]], + ]) -> CommandT: if isinstance(func, Command): raise TypeError('Callback is already a command.') return cls(func, name=name, **attrs) return decorator -def group(name=None, **attrs): +@overload +def group( + name: str = ..., + cls: Type[Group[CogT, P, T]] = ..., + **attrs: Any, +) -> Callable[ + [ + Union[ + Callable[Concatenate[CogT, ContextT, P], Coro[T]], + Callable[Concatenate[ContextT, P], Coro[T]], + ] + ] +, Group[CogT, P, T]]: + ... + +@overload +def group( + name: str = ..., + cls: Type[GroupT] = ..., + **attrs: Any, +) -> Callable[ + [ + Union[ + Callable[Concatenate[CogT, ContextT, P], Coro[Any]], + Callable[Concatenate[ContextT, P], Coro[Any]], + ] + ] +, GroupT]: + ... + +def group( + name: str = MISSING, + cls: Type[GroupT] = MISSING, + **attrs: Any, +) -> Callable[ + [ + Union[ + Callable[Concatenate[ContextT, P], Coro[Any]], + Callable[Concatenate[CogT, ContextT, P], Coro[T]], + ] + ] +, Union[Group[CogT, P, T], GroupT]]: """A decorator that transforms a function into a :class:`.Group`. This is similar to the :func:`.command` decorator but the ``cls`` @@ -1411,11 +1628,11 @@ def group(name=None, **attrs): .. versionchanged:: 1.1 The ``cls`` parameter can now be passed. """ + if cls is MISSING: + cls = Group # type: ignore + return command(name=name, cls=cls, **attrs) # type: ignore - attrs.setdefault('cls', Group) - return command(name=name, **attrs) - -def check(predicate): +def check(predicate: Check) -> Callable[[T], T]: r"""A decorator that adds a check to the :class:`.Command` or its subclasses. These checks could be accessed via :attr:`.Command.checks`. @@ -1486,7 +1703,7 @@ def check(predicate): The predicate to check if the command should be invoked. """ - def decorator(func): + def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]: if isinstance(func, Command): func.checks.append(predicate) else: @@ -1502,12 +1719,12 @@ def check(predicate): else: @functools.wraps(predicate) async def wrapper(ctx): - return predicate(ctx) + return predicate(ctx) # type: ignore decorator.predicate = wrapper - return decorator + return decorator # type: ignore -def check_any(*checks): +def check_any(*checks: Check) -> Callable[[T], T]: r"""A :func:`check` that is added that checks if any of the checks passed will pass, i.e. using logical OR. @@ -1560,7 +1777,7 @@ def check_any(*checks): else: unwrapped.append(pred) - async def predicate(ctx): + async def predicate(ctx: Context) -> bool: errors = [] for func in unwrapped: try: @@ -1575,7 +1792,7 @@ def check_any(*checks): return check(predicate) -def has_role(item): +def has_role(item: Union[int, str]) -> Callable[[T], T]: """A :func:`.check` that is added that checks if the member invoking the command has the role specified via the name or ID specified. @@ -1602,21 +1819,22 @@ def has_role(item): The name or ID of the role to check. """ - def predicate(ctx): - if not isinstance(ctx.channel, discord.abc.GuildChannel): + def predicate(ctx: Context) -> bool: + if ctx.guild is None: raise NoPrivateMessage() + # ctx.guild is None doesn't narrow ctx.author to Member if isinstance(item, int): - role = discord.utils.get(ctx.author.roles, id=item) + role = discord.utils.get(ctx.author.roles, id=item) # type: ignore else: - role = discord.utils.get(ctx.author.roles, name=item) + role = discord.utils.get(ctx.author.roles, name=item) # type: ignore if role is None: raise MissingRole(item) return True return check(predicate) -def has_any_role(*items): +def has_any_role(*items: Union[int, str]) -> Callable[[T], T]: r"""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`. @@ -1648,17 +1866,18 @@ def has_any_role(*items): await ctx.send('You are cool indeed') """ def predicate(ctx): - if not isinstance(ctx.channel, discord.abc.GuildChannel): + if ctx.guild is None: raise NoPrivateMessage() - getter = functools.partial(discord.utils.get, ctx.author.roles) + # ctx.guild is None doesn't narrow ctx.author to Member + getter = functools.partial(discord.utils.get, ctx.author.roles) # type: ignore if any(getter(id=item) is not None if isinstance(item, int) else getter(name=item) is not None for item in items): return True - raise MissingAnyRole(items) + raise MissingAnyRole(list(items)) return check(predicate) -def bot_has_role(item): +def bot_has_role(item: int) -> Callable[[T], T]: """Similar to :func:`.has_role` except checks if the bot itself has the role. @@ -1673,11 +1892,10 @@ def bot_has_role(item): """ def predicate(ctx): - ch = ctx.channel - if not isinstance(ch, discord.abc.GuildChannel): + if ctx.guild is None: raise NoPrivateMessage() - me = ch.guild.me + me = ctx.me if isinstance(item, int): role = discord.utils.get(me.roles, id=item) else: @@ -1687,7 +1905,7 @@ def bot_has_role(item): return True return check(predicate) -def bot_has_any_role(*items): +def bot_has_any_role(*items: int) -> Callable[[T], T]: """Similar to :func:`.has_any_role` except checks if the bot itself has any of the roles listed. @@ -1701,18 +1919,17 @@ def bot_has_any_role(*items): instead of generic checkfailure """ def predicate(ctx): - ch = ctx.channel - if not isinstance(ch, discord.abc.GuildChannel): + if ctx.guild is None: raise NoPrivateMessage() - me = ch.guild.me + me = ctx.me getter = functools.partial(discord.utils.get, me.roles) if any(getter(id=item) is not None if isinstance(item, int) else getter(name=item) is not None for item in items): return True - raise BotMissingAnyRole(items) + raise BotMissingAnyRole(list(items)) return check(predicate) -def has_permissions(**perms): +def has_permissions(**perms: bool) -> Callable[[T], T]: """A :func:`.check` that is added that checks if the member has all of the permissions necessary. @@ -1746,9 +1963,9 @@ def has_permissions(**perms): if invalid: raise TypeError(f"Invalid permission(s): {', '.join(invalid)}") - def predicate(ctx): + def predicate(ctx: Context) -> bool: ch = ctx.channel - permissions = ch.permissions_for(ctx.author) + permissions = ch.permissions_for(ctx.author) # type: ignore missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value] @@ -1759,7 +1976,7 @@ def has_permissions(**perms): return check(predicate) -def bot_has_permissions(**perms): +def bot_has_permissions(**perms: bool) -> Callable[[T], T]: """Similar to :func:`.has_permissions` except checks if the bot itself has the permissions listed. @@ -1771,10 +1988,10 @@ def bot_has_permissions(**perms): if invalid: raise TypeError(f"Invalid permission(s): {', '.join(invalid)}") - def predicate(ctx): + def predicate(ctx: Context) -> bool: guild = ctx.guild me = guild.me if guild is not None else ctx.bot.user - permissions = ctx.channel.permissions_for(me) + permissions = ctx.channel.permissions_for(me) # type: ignore missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value] @@ -1785,7 +2002,7 @@ def bot_has_permissions(**perms): return check(predicate) -def has_guild_permissions(**perms): +def has_guild_permissions(**perms: bool) -> Callable[[T], T]: """Similar to :func:`.has_permissions`, but operates on guild wide permissions instead of the current channel permissions. @@ -1799,11 +2016,11 @@ def has_guild_permissions(**perms): if invalid: raise TypeError(f"Invalid permission(s): {', '.join(invalid)}") - def predicate(ctx): + def predicate(ctx: Context) -> bool: if not ctx.guild: raise NoPrivateMessage - permissions = ctx.author.guild_permissions + permissions = ctx.author.guild_permissions # type: ignore missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value] if not missing: @@ -1813,7 +2030,7 @@ def has_guild_permissions(**perms): return check(predicate) -def bot_has_guild_permissions(**perms): +def bot_has_guild_permissions(**perms: bool) -> Callable[[T], T]: """Similar to :func:`.has_guild_permissions`, but checks the bot members guild permissions. @@ -1824,11 +2041,11 @@ def bot_has_guild_permissions(**perms): if invalid: raise TypeError(f"Invalid permission(s): {', '.join(invalid)}") - def predicate(ctx): + def predicate(ctx: Context) -> bool: if not ctx.guild: raise NoPrivateMessage - permissions = ctx.me.guild_permissions + permissions = ctx.me.guild_permissions # type: ignore missing = [perm for perm, value in perms.items() if getattr(permissions, perm) != value] if not missing: @@ -1838,7 +2055,7 @@ def bot_has_guild_permissions(**perms): return check(predicate) -def dm_only(): +def dm_only() -> Callable[[T], T]: """A :func:`.check` that indicates this command must only be used in a DM context. Only private messages are allowed when using the command. @@ -1849,14 +2066,14 @@ def dm_only(): .. versionadded:: 1.1 """ - def predicate(ctx): + def predicate(ctx: Context) -> bool: if ctx.guild is not None: raise PrivateMessageOnly() return True return check(predicate) -def guild_only(): +def guild_only() -> Callable[[T], T]: """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. @@ -1865,14 +2082,14 @@ def guild_only(): that is inherited from :exc:`.CheckFailure`. """ - def predicate(ctx): + def predicate(ctx: Context) -> bool: if ctx.guild is None: raise NoPrivateMessage() return True return check(predicate) -def is_owner(): +def is_owner() -> Callable[[T], T]: """A :func:`.check` that checks if the person invoking this command is the owner of the bot. @@ -1882,14 +2099,14 @@ def is_owner(): from :exc:`.CheckFailure`. """ - async def predicate(ctx): + async def predicate(ctx: Context) -> bool: if not await ctx.bot.is_owner(ctx.author): raise NotOwner('You do not own this bot.') return True return check(predicate) -def is_nsfw(): +def is_nsfw() -> Callable[[T], T]: """A :func:`.check` that checks if the channel is a NSFW channel. This check raises a special exception, :exc:`.NSFWChannelRequired` @@ -1900,14 +2117,14 @@ def is_nsfw(): Raise :exc:`.NSFWChannelRequired` instead of generic :exc:`.CheckFailure`. DM channels will also now pass this check. """ - def pred(ctx): + def pred(ctx: Context) -> bool: ch = ctx.channel - if ctx.guild is None or (isinstance(ch, discord.TextChannel) and ch.is_nsfw()): + if ctx.guild is None or (isinstance(ch, (discord.TextChannel, discord.Thread)) and ch.is_nsfw()): return True - raise NSFWChannelRequired(ch) + raise NSFWChannelRequired(ch) # type: ignore return check(pred) -def cooldown(rate, per, type=BucketType.default): +def cooldown(rate: int, per: float, type: Union[BucketType, Callable[[Message], Any]] = BucketType.default) -> Callable[[T], T]: """A decorator that adds a cooldown to a :class:`.Command` A cooldown allows a command to only be used a specific amount @@ -1934,15 +2151,15 @@ def cooldown(rate, per, type=BucketType.default): Callables are now supported for custom bucket types. """ - def decorator(func): + def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]: if isinstance(func, Command): func._buckets = CooldownMapping(Cooldown(rate, per), type) else: func.__commands_cooldown__ = CooldownMapping(Cooldown(rate, per), type) return func - return decorator + return decorator # type: ignore -def dynamic_cooldown(cooldown, type=BucketType.default): +def dynamic_cooldown(cooldown: Union[BucketType, Callable[[Message], Any]], type: BucketType = BucketType.default) -> Callable[[T], T]: """A decorator that adds a dynamic cooldown to a :class:`.Command` This differs from :func:`.cooldown` in that it takes a function that @@ -1974,15 +2191,15 @@ def dynamic_cooldown(cooldown, type=BucketType.default): if not callable(cooldown): raise TypeError("A callable must be provided") - def decorator(func): + def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]: if isinstance(func, Command): func._buckets = DynamicCooldownMapping(cooldown, type) else: func.__commands_cooldown__ = DynamicCooldownMapping(cooldown, type) return func - return decorator + return decorator # type: ignore -def max_concurrency(number, per=BucketType.default, *, wait=False): +def max_concurrency(number: int, per: BucketType = BucketType.default, *, wait: bool = False) -> Callable[[T], T]: """A decorator that adds a maximum concurrency to a :class:`.Command` or its subclasses. This enables you to only allow a certain number of command invocations at the same time, @@ -2006,16 +2223,16 @@ def max_concurrency(number, per=BucketType.default, *, wait=False): then the command waits until it can be executed. """ - def decorator(func): + def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]: value = MaxConcurrency(number, per=per, wait=wait) if isinstance(func, Command): func._max_concurrency = value else: func.__commands_max_concurrency__ = value return func - return decorator + return decorator # type: ignore -def before_invoke(coro): +def before_invoke(coro) -> Callable[[T], T]: """A decorator that registers a coroutine as a pre-invoke hook. This allows you to refer to one before invoke hook for several commands that @@ -2053,15 +2270,15 @@ def before_invoke(coro): bot.add_cog(What()) """ - def decorator(func): + def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]: if isinstance(func, Command): func.before_invoke(coro) else: func.__before_invoke__ = coro return func - return decorator + return decorator # type: ignore -def after_invoke(coro): +def after_invoke(coro) -> Callable[[T], T]: """A decorator that registers a coroutine as a post-invoke hook. This allows you to refer to one after invoke hook for several commands that @@ -2069,10 +2286,10 @@ def after_invoke(coro): .. versionadded:: 1.4 """ - def decorator(func): + def decorator(func: Union[Command, CoroFunc]) -> Union[Command, CoroFunc]: if isinstance(func, Command): func.after_invoke(coro) else: func.__after_invoke__ = coro return func - return decorator + return decorator # type: ignore diff --git a/discord/ext/commands/errors.py b/discord/ext/commands/errors.py index 0f0185be..93834385 100644 --- a/discord/ext/commands/errors.py +++ b/discord/ext/commands/errors.py @@ -22,8 +22,23 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + +from typing import Optional, Any, TYPE_CHECKING, List, Callable, Type, Tuple, Union + from discord.errors import ClientException, DiscordException +if TYPE_CHECKING: + from inspect import Parameter + + from .converter import Converter + from .context import Context + from .cooldowns import Cooldown, BucketType + from .flags import Flag + from discord.abc import GuildChannel + from discord.threads import Thread + from discord.types.snowflake import Snowflake, SnowflakeList + __all__ = ( 'CommandError', @@ -54,6 +69,7 @@ __all__ = ( 'RoleNotFound', 'BadInviteArgument', 'EmojiNotFound', + 'GuildStickerNotFound', 'PartialEmojiConversionFailure', 'BadBoolArgument', 'MissingRole', @@ -93,7 +109,7 @@ class CommandError(DiscordException): in a special way as they are caught and passed into a special event from :class:`.Bot`\, :func:`.on_command_error`. """ - def __init__(self, message=None, *args): + def __init__(self, message: Optional[str] = None, *args: Any) -> None: if message is not None: # clean-up @everyone and @here mentions m = message.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere') @@ -114,9 +130,9 @@ class ConversionError(CommandError): The original exception that was raised. You can also get this via the ``__cause__`` attribute. """ - def __init__(self, converter, original): - self.converter = converter - self.original = original + def __init__(self, converter: Converter, original: Exception) -> None: + self.converter: Converter = converter + self.original: Exception = original class UserInputError(CommandError): """The base exception type for errors that involve errors @@ -148,8 +164,8 @@ class MissingRequiredArgument(UserInputError): param: :class:`inspect.Parameter` The argument that is missing. """ - def __init__(self, param): - self.param = param + def __init__(self, param: Parameter) -> None: + self.param: Parameter = param super().__init__(f'{param.name} is a required argument that is missing.') class TooManyArguments(UserInputError): @@ -190,9 +206,9 @@ class CheckAnyFailure(CheckFailure): A list of check predicates that failed. """ - def __init__(self, checks, errors): - self.checks = checks - self.errors = errors + def __init__(self, checks: List[CheckFailure], errors: List[Callable[[Context], bool]]) -> None: + self.checks: List[CheckFailure] = checks + self.errors: List[Callable[[Context], bool]] = errors super().__init__('You do not have permission to run this command.') class PrivateMessageOnly(CheckFailure): @@ -201,7 +217,7 @@ class PrivateMessageOnly(CheckFailure): This inherits from :exc:`CheckFailure` """ - def __init__(self, message=None): + def __init__(self, message: Optional[str] = None) -> None: super().__init__(message or 'This command can only be used in private messages.') class NoPrivateMessage(CheckFailure): @@ -211,7 +227,7 @@ class NoPrivateMessage(CheckFailure): This inherits from :exc:`CheckFailure` """ - def __init__(self, message=None): + def __init__(self, message: Optional[str] = None) -> None: super().__init__(message or 'This command cannot be used in private messages.') class NotOwner(CheckFailure): @@ -234,8 +250,8 @@ class ObjectNotFound(BadArgument): argument: :class:`str` The argument supplied by the caller that was not matched """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'{argument!r} does not follow a valid ID or mention format.') class MemberNotFound(BadArgument): @@ -251,8 +267,8 @@ class MemberNotFound(BadArgument): argument: :class:`str` The member supplied by the caller that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Member "{argument}" not found.') class GuildNotFound(BadArgument): @@ -267,8 +283,8 @@ class GuildNotFound(BadArgument): argument: :class:`str` The guild supplied by the called that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Guild "{argument}" not found.') class UserNotFound(BadArgument): @@ -284,8 +300,8 @@ class UserNotFound(BadArgument): argument: :class:`str` The user supplied by the caller that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'User "{argument}" not found.') class MessageNotFound(BadArgument): @@ -300,8 +316,8 @@ class MessageNotFound(BadArgument): argument: :class:`str` The message supplied by the caller that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Message "{argument}" not found.') class ChannelNotReadable(BadArgument): @@ -314,11 +330,11 @@ class ChannelNotReadable(BadArgument): Attributes ----------- - argument: :class:`.abc.GuildChannel` + argument: Union[:class:`.abc.GuildChannel`, :class:`.Thread`] The channel supplied by the caller that was not readable """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: Union[GuildChannel, Thread]) -> None: + self.argument: Union[GuildChannel, Thread] = argument super().__init__(f"Can't read messages in {argument.mention}.") class ChannelNotFound(BadArgument): @@ -333,8 +349,8 @@ class ChannelNotFound(BadArgument): argument: :class:`str` The channel supplied by the caller that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Channel "{argument}" not found.') class ThreadNotFound(BadArgument): @@ -349,8 +365,8 @@ class ThreadNotFound(BadArgument): argument: :class:`str` The thread supplied by the caller that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Thread "{argument}" not found.') class BadColourArgument(BadArgument): @@ -365,8 +381,8 @@ class BadColourArgument(BadArgument): argument: :class:`str` The colour supplied by the caller that was not valid """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Colour "{argument}" is invalid.') BadColorArgument = BadColourArgument @@ -383,8 +399,8 @@ class RoleNotFound(BadArgument): argument: :class:`str` The role supplied by the caller that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Role "{argument}" not found.') class BadInviteArgument(BadArgument): @@ -394,8 +410,8 @@ class BadInviteArgument(BadArgument): .. versionadded:: 1.5 """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Invite "{argument}" is invalid or expired.') class EmojiNotFound(BadArgument): @@ -410,8 +426,8 @@ class EmojiNotFound(BadArgument): argument: :class:`str` The emoji supplied by the caller that was not found """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Emoji "{argument}" not found.') class PartialEmojiConversionFailure(BadArgument): @@ -427,10 +443,26 @@ class PartialEmojiConversionFailure(BadArgument): argument: :class:`str` The emoji supplied by the caller that did not match the regex """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'Couldn\'t convert "{argument}" to PartialEmoji.') +class GuildStickerNotFound(BadArgument): + """Exception raised when the bot can not find the sticker. + + This inherits from :exc:`BadArgument` + + .. versionadded:: 2.0 + + Attributes + ----------- + argument: :class:`str` + The sticker supplied by the caller that was not found + """ + def __init__(self, argument: str) -> None: + self.argument: str = argument + super().__init__(f'Sticker "{argument}" not found.') + class BadBoolArgument(BadArgument): """Exception raised when a boolean argument was not convertable. @@ -443,8 +475,8 @@ class BadBoolArgument(BadArgument): argument: :class:`str` The boolean argument supplied by the caller that is not in the predefined list """ - def __init__(self, argument): - self.argument = argument + def __init__(self, argument: str) -> None: + self.argument: str = argument super().__init__(f'{argument} is not a recognised boolean option') class DisabledCommand(CommandError): @@ -465,8 +497,8 @@ class CommandInvokeError(CommandError): The original exception that was raised. You can also get this via the ``__cause__`` attribute. """ - def __init__(self, e): - self.original = e + def __init__(self, e: Exception) -> None: + self.original: Exception = e super().__init__(f'Command raised an exception: {e.__class__.__name__}: {e}') class CommandOnCooldown(CommandError): @@ -476,7 +508,7 @@ class CommandOnCooldown(CommandError): Attributes ----------- - cooldown: ``Cooldown`` + cooldown: :class:`.Cooldown` A class with attributes ``rate`` and ``per`` similar to the :func:`.cooldown` decorator. type: :class:`BucketType` @@ -484,10 +516,10 @@ class CommandOnCooldown(CommandError): retry_after: :class:`float` The amount of seconds to wait before you can retry again. """ - def __init__(self, cooldown, retry_after, type): - self.cooldown = cooldown - self.retry_after = retry_after - self.type = type + def __init__(self, cooldown: Cooldown, retry_after: float, type: BucketType) -> None: + self.cooldown: Cooldown = cooldown + self.retry_after: float = retry_after + self.type: BucketType = type super().__init__(f'You are on cooldown. Try again in {retry_after:.2f}s') class MaxConcurrencyReached(CommandError): @@ -503,9 +535,9 @@ class MaxConcurrencyReached(CommandError): The bucket type passed to the :func:`.max_concurrency` decorator. """ - def __init__(self, number, per): - self.number = number - self.per = per + def __init__(self, number: int, per: BucketType) -> None: + self.number: int = number + self.per: BucketType = per name = per.name suffix = 'per %s' % name if per.name != 'default' else 'globally' plural = '%s times %s' if number > 1 else '%s time %s' @@ -525,8 +557,8 @@ class MissingRole(CheckFailure): The required role that is missing. This is the parameter passed to :func:`~.commands.has_role`. """ - def __init__(self, missing_role): - self.missing_role = missing_role + def __init__(self, missing_role: Snowflake) -> None: + self.missing_role: Snowflake = missing_role message = f'Role {missing_role!r} is required to run this command.' super().__init__(message) @@ -543,8 +575,8 @@ class BotMissingRole(CheckFailure): The required role that is missing. This is the parameter passed to :func:`~.commands.has_role`. """ - def __init__(self, missing_role): - self.missing_role = missing_role + def __init__(self, missing_role: Snowflake) -> None: + self.missing_role: Snowflake = missing_role message = f'Bot requires the role {missing_role!r} to run this command' super().__init__(message) @@ -562,8 +594,8 @@ class MissingAnyRole(CheckFailure): The roles that the invoker is missing. These are the parameters passed to :func:`~.commands.has_any_role`. """ - def __init__(self, missing_roles): - self.missing_roles = missing_roles + def __init__(self, missing_roles: SnowflakeList) -> None: + self.missing_roles: SnowflakeList = missing_roles missing = [f"'{role}'" for role in missing_roles] @@ -591,8 +623,8 @@ class BotMissingAnyRole(CheckFailure): These are the parameters passed to :func:`~.commands.has_any_role`. """ - def __init__(self, missing_roles): - self.missing_roles = missing_roles + def __init__(self, missing_roles: SnowflakeList) -> None: + self.missing_roles: SnowflakeList = missing_roles missing = [f"'{role}'" for role in missing_roles] @@ -613,11 +645,11 @@ class NSFWChannelRequired(CheckFailure): Parameters ----------- - channel: :class:`discord.abc.GuildChannel` + channel: Union[:class:`.abc.GuildChannel`, :class:`.Thread`] The channel that does not have NSFW enabled. """ - def __init__(self, channel): - self.channel = channel + def __init__(self, channel: Union[GuildChannel, Thread]) -> None: + self.channel: Union[GuildChannel, Thread] = channel super().__init__(f"Channel '{channel}' needs to be NSFW for this command to work.") class MissingPermissions(CheckFailure): @@ -628,11 +660,11 @@ class MissingPermissions(CheckFailure): Attributes ----------- - missing_permissions: :class:`list` + missing_permissions: List[:class:`str`] The required permissions that are missing. """ - def __init__(self, missing_permissions, *args): - self.missing_permissions = missing_permissions + def __init__(self, missing_permissions: List[str], *args: Any) -> None: + self.missing_permissions: List[str] = missing_permissions missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in missing_permissions] @@ -651,11 +683,11 @@ class BotMissingPermissions(CheckFailure): Attributes ----------- - missing_permissions: :class:`list` + missing_permissions: List[:class:`str`] The required permissions that are missing. """ - def __init__(self, missing_permissions, *args): - self.missing_permissions = missing_permissions + def __init__(self, missing_permissions: List[str], *args: Any) -> None: + self.missing_permissions: List[str] = missing_permissions missing = [perm.replace('_', ' ').replace('guild', 'server').title() for perm in missing_permissions] @@ -681,10 +713,10 @@ class BadUnionArgument(UserInputError): errors: List[:class:`CommandError`] A list of errors that were caught from failing the conversion. """ - def __init__(self, param, converters, errors): - self.param = param - self.converters = converters - self.errors = errors + def __init__(self, param: Parameter, converters: Tuple[Type, ...], errors: List[CommandError]) -> None: + self.param: Parameter = param + self.converters: Tuple[Type, ...] = converters + self.errors: List[CommandError] = errors def _get_name(x): try: @@ -719,10 +751,10 @@ class BadLiteralArgument(UserInputError): errors: List[:class:`CommandError`] A list of errors that were caught from failing the conversion. """ - def __init__(self, param, literals, errors): - self.param = param - self.literals = literals - self.errors = errors + def __init__(self, param: Parameter, literals: Tuple[Any, ...], errors: List[CommandError]) -> None: + self.param: Parameter = param + self.literals: Tuple[Any, ...] = literals + self.errors: List[CommandError] = errors to_string = [repr(l) for l in literals] if len(to_string) > 2: @@ -752,8 +784,8 @@ class UnexpectedQuoteError(ArgumentParsingError): quote: :class:`str` The quote mark that was found inside the non-quoted string. """ - def __init__(self, quote): - self.quote = quote + def __init__(self, quote: str) -> None: + self.quote: str = quote super().__init__(f'Unexpected quote mark, {quote!r}, in non-quoted string') class InvalidEndOfQuotedStringError(ArgumentParsingError): @@ -767,8 +799,8 @@ class InvalidEndOfQuotedStringError(ArgumentParsingError): char: :class:`str` The character found instead of the expected string. """ - def __init__(self, char): - self.char = char + def __init__(self, char: str) -> None: + self.char: str = char super().__init__(f'Expected space after closing quotation but received {char!r}') class ExpectedClosingQuoteError(ArgumentParsingError): @@ -782,8 +814,8 @@ class ExpectedClosingQuoteError(ArgumentParsingError): The quote character expected. """ - def __init__(self, close_quote): - self.close_quote = close_quote + def __init__(self, close_quote: str) -> None: + self.close_quote: str = close_quote super().__init__(f'Expected closing {close_quote}.') class ExtensionError(DiscordException): @@ -796,8 +828,8 @@ class ExtensionError(DiscordException): name: :class:`str` The extension that had an error. """ - def __init__(self, message=None, *args, name): - self.name = name + def __init__(self, message: Optional[str] = None, *args: Any, name: str) -> None: + self.name: str = name message = message or f'Extension {name!r} had an error.' # clean-up @everyone and @here mentions m = message.replace('@everyone', '@\u200beveryone').replace('@here', '@\u200bhere') @@ -808,7 +840,7 @@ class ExtensionAlreadyLoaded(ExtensionError): This inherits from :exc:`ExtensionError` """ - def __init__(self, name): + def __init__(self, name: str) -> None: super().__init__(f'Extension {name!r} is already loaded.', name=name) class ExtensionNotLoaded(ExtensionError): @@ -816,7 +848,7 @@ class ExtensionNotLoaded(ExtensionError): This inherits from :exc:`ExtensionError` """ - def __init__(self, name): + def __init__(self, name: str) -> None: super().__init__(f'Extension {name!r} has not been loaded.', name=name) class NoEntryPointError(ExtensionError): @@ -824,7 +856,7 @@ class NoEntryPointError(ExtensionError): This inherits from :exc:`ExtensionError` """ - def __init__(self, name): + def __init__(self, name: str) -> None: super().__init__(f"Extension {name!r} has no 'setup' function.", name=name) class ExtensionFailed(ExtensionError): @@ -840,8 +872,8 @@ class ExtensionFailed(ExtensionError): The original exception that was raised. You can also get this via the ``__cause__`` attribute. """ - def __init__(self, name, original): - self.original = original + def __init__(self, name: str, original: Exception) -> None: + self.original: Exception = original msg = f'Extension {name!r} raised an error: {original.__class__.__name__}: {original}' super().__init__(msg, name=name) @@ -858,7 +890,7 @@ class ExtensionNotFound(ExtensionError): name: :class:`str` The extension that had the error. """ - def __init__(self, name): + def __init__(self, name: str) -> None: msg = f'Extension {name!r} could not be loaded.' super().__init__(msg, name=name) @@ -877,9 +909,9 @@ class CommandRegistrationError(ClientException): alias_conflict: :class:`bool` Whether the name that conflicts is an alias of the command we try to add. """ - def __init__(self, name, *, alias_conflict=False): - self.name = name - self.alias_conflict = alias_conflict + def __init__(self, name: str, *, alias_conflict: bool = False) -> None: + self.name: str = name + self.alias_conflict: bool = alias_conflict type_ = 'alias' if alias_conflict else 'command' super().__init__(f'The {type_} {name} is already an existing command or alias.') @@ -906,17 +938,25 @@ class TooManyFlags(FlagError): values: List[:class:`str`] The values that were passed. """ - def __init__(self, flag, values): - self.flag = flag - self.values = values + def __init__(self, flag: Flag, values: List[str]) -> None: + self.flag: Flag = flag + self.values: List[str] = values super().__init__(f'Too many flag values, expected {flag.max_args} but received {len(values)}.') class BadFlagArgument(FlagError): """An exception raised when a flag failed to convert a value. + This inherits from :exc:`FlagError` + + .. versionadded:: 2.0 + + Attributes + ----------- + flag: :class:`~discord.ext.commands.Flag` + The flag that failed to convert. """ - def __init__(self, flag): - self.flag = flag + def __init__(self, flag: Flag) -> None: + self.flag: Flag = flag try: name = flag.annotation.__name__ except AttributeError: @@ -936,8 +976,8 @@ class MissingRequiredFlag(FlagError): flag: :class:`~discord.ext.commands.Flag` The required flag that was not found. """ - def __init__(self, flag): - self.flag = flag + def __init__(self, flag: Flag) -> None: + self.flag: Flag = flag super().__init__(f'Flag {flag.name!r} is required and missing') class MissingFlagArgument(FlagError): @@ -952,6 +992,6 @@ class MissingFlagArgument(FlagError): flag: :class:`~discord.ext.commands.Flag` The flag that did not get a value. """ - def __init__(self, flag): - self.flag = flag + def __init__(self, flag: Flag) -> None: + self.flag: Flag = flag super().__init__(f'Flag {flag.name!r} does not have an argument') diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 6de81bb5..afaacbfb 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -27,11 +27,17 @@ import copy import functools import inspect import re + +from typing import Optional, TYPE_CHECKING + import discord.utils from .core import Group, Command from .errors import CommandError +if TYPE_CHECKING: + from .context import Context + __all__ = ( 'Paginator', 'HelpCommand', @@ -320,7 +326,7 @@ class HelpCommand: self.command_attrs = attrs = options.pop('command_attrs', {}) attrs.setdefault('name', 'help') attrs.setdefault('help', 'Shows this message') - self.context = None + self.context: Context = discord.utils.MISSING self._command_impl = _HelpCommandImpl(self, **self.command_attrs) def copy(self): diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index 5a096c50..5b78f10e 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -27,22 +27,20 @@ from __future__ import annotations import asyncio import datetime from typing import ( - Any, - Awaitable, - Callable, + Any, + Awaitable, + Callable, Generic, - List, - Optional, - Type, + List, + Optional, + Type, TypeVar, Union, - cast, ) import aiohttp import discord import inspect -import logging import sys import traceback @@ -50,8 +48,6 @@ from collections.abc import Sequence from discord.backoff import ExponentialBackoff from discord.utils import MISSING -log = logging.getLogger(__name__) - __all__ = ( 'loop', ) @@ -61,7 +57,6 @@ _func = Callable[..., Awaitable[Any]] LF = TypeVar('LF', bound=_func) FT = TypeVar('FT', bound=_func) ET = TypeVar('ET', bound=Callable[[Any, BaseException], Awaitable[Any]]) -LT = TypeVar('LT', bound='Loop') class SleepHandle: @@ -78,7 +73,7 @@ class SleepHandle: relative_delta = discord.utils.compute_timedelta(dt) self.handle = self.loop.call_later(relative_delta, self.future.set_result, True) - def wait(self) -> asyncio.Future: + def wait(self) -> asyncio.Future[Any]: return self.future def done(self) -> bool: @@ -94,7 +89,9 @@ class Loop(Generic[LF]): The main interface to create this is through :func:`loop`. """ - def __init__(self, + + def __init__( + self, coro: LF, seconds: float, hours: float, @@ -102,15 +99,15 @@ class Loop(Generic[LF]): time: Union[datetime.time, Sequence[datetime.time]], count: Optional[int], reconnect: bool, - loop: Optional[asyncio.AbstractEventLoop], + loop: asyncio.AbstractEventLoop, ) -> None: self.coro: LF = coro self.reconnect: bool = reconnect - self.loop: Optional[asyncio.AbstractEventLoop] = loop + self.loop: asyncio.AbstractEventLoop = loop self.count: Optional[int] = count self._current_loop = 0 - self._handle = None - self._task = None + self._handle: SleepHandle = MISSING + self._task: asyncio.Task[None] = MISSING self._injected = None self._valid_exception = ( OSError, @@ -131,7 +128,7 @@ class Loop(Generic[LF]): self.change_interval(seconds=seconds, minutes=minutes, hours=hours, time=time) self._last_iteration_failed = False - self._last_iteration = None + self._last_iteration: datetime.datetime = MISSING self._next_iteration = None if not inspect.iscoroutinefunction(self.coro): @@ -147,9 +144,8 @@ class Loop(Generic[LF]): else: await coro(*args, **kwargs) - def _try_sleep_until(self, dt: datetime.datetime): - self._handle = SleepHandle(dt=dt, loop=self.loop) # type: ignore + self._handle = SleepHandle(dt=dt, loop=self.loop) return self._handle.wait() async def _loop(self, *args: Any, **kwargs: Any) -> None: @@ -178,7 +174,7 @@ class Loop(Generic[LF]): await asyncio.sleep(backoff.delay()) else: await self._try_sleep_until(self._next_iteration) - + if self._stop_next_iteration: return @@ -211,14 +207,14 @@ class Loop(Generic[LF]): if obj is None: return self - copy = Loop( - self.coro, - seconds=self._seconds, - hours=self._hours, + copy: Loop[LF] = Loop( + self.coro, + seconds=self._seconds, + hours=self._hours, minutes=self._minutes, - time=self._time, + time=self._time, count=self.count, - reconnect=self.reconnect, + reconnect=self.reconnect, loop=self.loop, ) copy._injected = obj @@ -237,7 +233,7 @@ class Loop(Generic[LF]): """ if self._seconds is not MISSING: return self._seconds - + @property def minutes(self) -> Optional[float]: """Optional[:class:`float`]: Read-only value for the number of minutes @@ -247,7 +243,7 @@ class Loop(Generic[LF]): """ if self._minutes is not MISSING: return self._minutes - + @property def hours(self) -> Optional[float]: """Optional[:class:`float`]: Read-only value for the number of hours @@ -279,7 +275,7 @@ class Loop(Generic[LF]): .. versionadded:: 1.3 """ - if self._task is None: + if self._task is MISSING: return None elif self._task and self._task.done() or self._stop_next_iteration: return None @@ -305,7 +301,7 @@ class Loop(Generic[LF]): return await self.coro(*args, **kwargs) - def start(self, *args: Any, **kwargs: Any) -> asyncio.Task: + def start(self, *args: Any, **kwargs: Any) -> asyncio.Task[None]: r"""Starts the internal task in the event loop. Parameters @@ -326,13 +322,13 @@ class Loop(Generic[LF]): The task that has been created. """ - if self._task is not None and not self._task.done(): + if self._task is not MISSING and not self._task.done(): raise RuntimeError('Task is already launched and is not completed.') if self._injected is not None: args = (self._injected, *args) - if self.loop is None: + if self.loop is MISSING: self.loop = asyncio.get_event_loop() self._task = self.loop.create_task(self._loop(*args, **kwargs)) @@ -356,7 +352,7 @@ class Loop(Generic[LF]): .. versionadded:: 1.2 """ - if self._task and not self._task.done(): + if self._task is not MISSING and not self._task.done(): self._stop_next_iteration = True def _can_be_cancelled(self) -> bool: @@ -383,7 +379,7 @@ class Loop(Generic[LF]): The keyword arguments to use. """ - def restart_when_over(fut, *, args=args, kwargs=kwargs): + def restart_when_over(fut: Any, *, args: Any = args, kwargs: Any = kwargs) -> None: self._task.remove_done_callback(restart_when_over) self.start(*args, **kwargs) @@ -446,9 +442,9 @@ class Loop(Generic[LF]): self._valid_exception = tuple(x for x in self._valid_exception if x not in exceptions) return len(self._valid_exception) == old_length - len(exceptions) - def get_task(self) -> Optional[asyncio.Task]: + def get_task(self) -> Optional[asyncio.Task[None]]: """Optional[:class:`asyncio.Task`]: Fetches the internal task or ``None`` if there isn't one running.""" - return self._task + return self._task if self._task is not MISSING else None def is_being_cancelled(self) -> bool: """Whether the task is being cancelled.""" @@ -466,7 +462,7 @@ class Loop(Generic[LF]): .. versionadded:: 1.4 """ - return not bool(self._task.done()) if self._task else False + return not bool(self._task.done()) if self._task is not MISSING else False async def _error(self, *args: Any) -> None: exception: Exception = args[-1] @@ -560,7 +556,9 @@ class Loop(Generic[LF]): self._time_index = 0 if self._current_loop == 0: # if we're at the last index on the first iteration, we need to sleep until tomorrow - return datetime.datetime.combine(datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=1), self._time[0]) + return datetime.datetime.combine( + datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(days=1), self._time[0] + ) next_time = self._time[self._time_index] @@ -568,7 +566,7 @@ class Loop(Generic[LF]): self._time_index += 1 return datetime.datetime.combine(datetime.datetime.now(datetime.timezone.utc), next_time) - next_date = cast(datetime.datetime, self._last_iteration) + next_date = self._last_iteration if self._time_index == 0: # we can assume that the earliest time should be scheduled for "tomorrow" next_date += datetime.timedelta(days=1) @@ -576,12 +574,14 @@ class Loop(Generic[LF]): self._time_index += 1 return datetime.datetime.combine(next_date, next_time) - def _prepare_time_index(self, now: Optional[datetime.datetime] = None) -> None: + def _prepare_time_index(self, now: datetime.datetime = MISSING) -> None: # now kwarg should be a datetime.datetime representing the time "now" # to calculate the next time index from # pre-condition: self._time is set - time_now = (now or datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0)).timetz() + time_now = ( + now if now is not MISSING else datetime.datetime.now(datetime.timezone.utc).replace(microsecond=0) + ).timetz() for idx, time in enumerate(self._time): if time >= time_now: self._time_index = idx @@ -597,20 +597,24 @@ class Loop(Generic[LF]): utc: datetime.timezone = datetime.timezone.utc, ) -> List[datetime.time]: if isinstance(time, dt): - ret = time if time.tzinfo is not None else time.replace(tzinfo=utc) - return [ret] + inner = time if time.tzinfo is not None else time.replace(tzinfo=utc) + return [inner] if not isinstance(time, Sequence): - raise TypeError(f'Expected datetime.time or a sequence of datetime.time for ``time``, received {type(time)!r} instead.') + raise TypeError( + f'Expected datetime.time or a sequence of datetime.time for ``time``, received {type(time)!r} instead.' + ) if not time: raise ValueError('time parameter must not be an empty sequence.') - ret = [] + ret: List[datetime.time] = [] for index, t in enumerate(time): if not isinstance(t, dt): - raise TypeError(f'Expected a sequence of {dt!r} for ``time``, received {type(t).__name__!r} at index {index} instead.') + raise TypeError( + f'Expected a sequence of {dt!r} for ``time``, received {type(t).__name__!r} at index {index} instead.' + ) ret.append(t if t.tzinfo is not None else t.replace(tzinfo=utc)) - ret = sorted(set(ret)) # de-dupe and sort times + ret = sorted(set(ret)) # de-dupe and sort times return ret def change_interval( @@ -691,7 +695,7 @@ def loop( time: Union[datetime.time, Sequence[datetime.time]] = MISSING, count: Optional[int] = None, reconnect: bool = True, - loop: Optional[asyncio.AbstractEventLoop] = None, + loop: asyncio.AbstractEventLoop = MISSING, ) -> Callable[[LF], Loop[LF]]: """A decorator that schedules a task in the background for you with optional reconnect logic. The decorator returns a :class:`Loop`. @@ -707,7 +711,7 @@ def loop( time: Union[:class:`datetime.time`, Sequence[:class:`datetime.time`]] The exact times to run this loop at. Either a non-empty list or a single value of :class:`datetime.time` should be passed. Timezones are supported. - If no timezone is given for the times, it is assumed to represent UTC time. + If no timezone is given for the times, it is assumed to represent UTC time. This cannot be used in conjunction with the relative time parameters. @@ -724,7 +728,7 @@ def loop( Whether to handle errors and restart the task using an exponential back-off algorithm similar to the one used in :meth:`discord.Client.connect`. - loop: Optional[:class:`asyncio.AbstractEventLoop`] + loop: :class:`asyncio.AbstractEventLoop` The loop to use to register the task, if not given defaults to :func:`asyncio.get_event_loop`. @@ -736,15 +740,17 @@ def loop( The function was not a coroutine, an invalid value for the ``time`` parameter was passed, or ``time`` parameter was passed in conjunction with relative time parameters. """ + def decorator(func: LF) -> Loop[LF]: - kwargs = { - 'seconds': seconds, - 'minutes': minutes, - 'hours': hours, - 'count': count, - 'time': time, - 'reconnect': reconnect, - 'loop': loop, - } - return Loop(func, **kwargs) + return Loop[LF]( + func, + seconds=seconds, + minutes=minutes, + hours=hours, + count=count, + time=time, + reconnect=reconnect, + loop=loop, + ) + return decorator diff --git a/discord/flags.py b/discord/flags.py index 373a8957..3c5956a4 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -41,7 +41,7 @@ FV = TypeVar('FV', bound='flag_value') BF = TypeVar('BF', bound='BaseFlags') -class flag_value(Generic[BF]): +class flag_value: def __init__(self, func: Callable[[Any], int]): self.flag = func(None) self.__doc__ = func.__doc__ @@ -205,7 +205,7 @@ class SystemChannelFlags(BaseFlags): @flag_value def premium_subscriptions(self): - """:class:`bool`: Returns ``True`` if the system channel is used for Nitro boosting notifications.""" + """:class:`bool`: Returns ``True`` if the system channel is used for "Nitro boosting" notifications.""" return 2 @flag_value @@ -480,16 +480,6 @@ class Intents(BaseFlags): self.value = self.DEFAULT_VALUE return self - @classmethod - def default(cls: Type[Intents]) -> Intents: - """A factory method that creates a :class:`Intents` with everything enabled - except :attr:`presences` and :attr:`members`. - """ - self = cls.all() - self.presences = False - self.members = False - return self - @flag_value def guilds(self): """:class:`bool`: Whether guild related events are enabled. @@ -566,18 +556,34 @@ class Intents(BaseFlags): @flag_value def emojis(self): - """:class:`bool`: Whether guild emoji related events are enabled. + """:class:`bool`: Alias of :attr:`.emojis_and_stickers`. + + .. versionchanged:: 2.0 + Changed to an alias. + """ + return 1 << 3 + + @alias_flag_value + def emojis_and_stickers(self): + """:class:`bool`: Whether guild emoji and sticker related events are enabled. + + .. versionadded:: 2.0 This corresponds to the following events: - :func:`on_guild_emojis_update` + - :func:`on_guild_stickers_update` This also corresponds to the following attributes and classes in terms of cache: - :class:`Emoji` + - :class:`GuildSticker` - :meth:`Client.get_emoji` + - :meth:`Client.get_sticker` - :meth:`Client.emojis` + - :meth:`Client.stickers` - :attr:`Guild.emojis` + - :attr:`Guild.stickers` """ return 1 << 3 @@ -634,6 +640,10 @@ class Intents(BaseFlags): - :attr:`VoiceChannel.members` - :attr:`VoiceChannel.voice_states` - :attr:`Member.voice` + + .. note:: + + This intent is required to connect to voice. """ return 1 << 7 diff --git a/discord/gateway.py b/discord/gateway.py index aea1aad4..aa0c6ba0 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -40,7 +40,7 @@ from .activity import BaseActivity from .enums import SpeakingState from .errors import ConnectionClosed, InvalidArgument -log = logging.getLogger(__name__) +_log = logging.getLogger(__name__) __all__ = ( 'DiscordWebSocket', @@ -101,7 +101,7 @@ class GatewayRatelimiter: async with self.lock: delta = self.get_delay() if delta: - log.warning('WebSocket in shard ID %s is ratelimited, waiting %.2f seconds', self.shard_id, delta) + _log.warning('WebSocket in shard ID %s is ratelimited, waiting %.2f seconds', self.shard_id, delta) await asyncio.sleep(delta) @@ -129,20 +129,20 @@ class KeepAliveHandler(threading.Thread): def run(self): while not self._stop_ev.wait(self.interval): if self._last_recv + self.heartbeat_timeout < time.perf_counter(): - log.warning("Shard ID %s has stopped responding to the gateway. Closing and restarting.", self.shard_id) + _log.warning("Shard ID %s has stopped responding to the gateway. Closing and restarting.", self.shard_id) coro = self.ws.close(4000) f = asyncio.run_coroutine_threadsafe(coro, loop=self.ws.loop) try: f.result() except Exception: - log.exception('An error occurred while stopping the gateway. Ignoring.') + _log.exception('An error occurred while stopping the gateway. Ignoring.') finally: self.stop() return data = self.get_payload() - log.debug(self.msg, self.shard_id, data['d']) + _log.debug(self.msg, self.shard_id, data['d']) coro = self.ws.send_heartbeat(data) f = asyncio.run_coroutine_threadsafe(coro, loop=self.ws.loop) try: @@ -161,7 +161,7 @@ class KeepAliveHandler(threading.Thread): else: stack = ''.join(traceback.format_stack(frame)) msg = f'{self.block_msg}\nLoop thread traceback (most recent call last):\n{stack}' - log.warning(msg, self.shard_id, total) + _log.warning(msg, self.shard_id, total) except Exception: self.stop() @@ -185,7 +185,7 @@ class KeepAliveHandler(threading.Thread): self._last_ack = ack_time self.latency = ack_time - self._last_send if self.latency > 10: - log.warning(self.behind_msg, self.shard_id, self.latency) + _log.warning(self.behind_msg, self.shard_id, self.latency) class VoiceKeepAliveHandler(KeepAliveHandler): def __init__(self, *args, **kwargs): @@ -293,6 +293,12 @@ class DiscordWebSocket: def is_ratelimited(self): return self._rate_limiter.is_ratelimited() + def debug_log_receive(self, data, /): + self._dispatch('socket_raw_receive', data) + + def log_receive(self, _, /): + pass + @classmethod async def from_client(cls, client, *, initial=False, gateway=None, shard_id=None, session=None, sequence=None, resume=False): """Creates a main websocket for Discord from a :class:`Client`. @@ -318,9 +324,13 @@ class DiscordWebSocket: ws.sequence = sequence ws._max_heartbeat_timeout = client._connection.heartbeat_timeout + if client._enable_debug_events: + ws.send = ws.debug_send + ws.log_receive = ws.debug_log_receive + client._connection._update_references(ws) - log.debug('Created websocket connected to %s', gateway) + _log.debug('Created websocket connected to %s', gateway) # poll event for OP Hello await ws.poll_event() @@ -393,7 +403,7 @@ class DiscordWebSocket: await self.call_hooks('before_identify', self.shard_id, initial=self._initial_identify) await self.send_as_json(payload) - log.info('Shard ID %s has sent the IDENTIFY payload.', self.shard_id) + _log.info('Shard ID %s has sent the IDENTIFY payload.', self.shard_id) async def resume(self): """Sends the RESUME packet.""" @@ -407,11 +417,9 @@ class DiscordWebSocket: } await self.send_as_json(payload) - log.info('Shard ID %s has sent the RESUME payload.', self.shard_id) - - async def received_message(self, msg): - self._dispatch('socket_raw_receive', msg) + _log.info('Shard ID %s has sent the RESUME payload.', self.shard_id) + async def received_message(self, msg, /): if type(msg) is bytes: self._buffer.extend(msg) @@ -420,10 +428,14 @@ class DiscordWebSocket: msg = self._zlib.decompress(self._buffer) msg = msg.decode('utf-8') self._buffer = bytearray() - msg = utils.from_json(msg) - log.debug('For Shard ID %s: WebSocket Event: %s', self.shard_id, msg) - self._dispatch('socket_response', msg) + self.log_receive(msg) + msg = utils._from_json(msg) + + _log.debug('For Shard ID %s: WebSocket Event: %s', self.shard_id, msg) + event = msg.get('t') + if event: + self._dispatch('socket_event_type', event) op = msg.get('op') data = msg.get('d') @@ -439,7 +451,7 @@ class DiscordWebSocket: # "reconnect" can only be handled by the Client # so we terminate our connection and raise an # internal exception signalling to reconnect. - log.debug('Received RECONNECT opcode.') + _log.debug('Received RECONNECT opcode.') await self.close() raise ReconnectWebSocket(self.shard_id) @@ -469,35 +481,33 @@ class DiscordWebSocket: self.sequence = None self.session_id = None - log.info('Shard ID %s session has been invalidated.', self.shard_id) + _log.info('Shard ID %s session has been invalidated.', self.shard_id) await self.close(code=1000) raise ReconnectWebSocket(self.shard_id, resume=False) - log.warning('Unknown OP code %s.', op) + _log.warning('Unknown OP code %s.', op) return - event = msg.get('t') - if event == 'READY': self._trace = trace = data.get('_trace', []) self.sequence = msg['s'] self.session_id = data['session_id'] # pass back shard ID to ready handler data['__shard_id__'] = self.shard_id - log.info('Shard ID %s has connected to Gateway: %s (Session ID: %s).', + _log.info('Shard ID %s has connected to Gateway: %s (Session ID: %s).', self.shard_id, ', '.join(trace), self.session_id) elif event == 'RESUMED': self._trace = trace = data.get('_trace', []) # pass back the shard ID to the resumed handler data['__shard_id__'] = self.shard_id - log.info('Shard ID %s has successfully RESUMED session %s under trace %s.', + _log.info('Shard ID %s has successfully RESUMED session %s under trace %s.', self.shard_id, self.session_id, ', '.join(trace)) try: func = self._discord_parsers[event] except KeyError: - log.debug('Unknown event %s.', event) + _log.debug('Unknown event %s.', event) else: func(data) @@ -551,10 +561,10 @@ class DiscordWebSocket: elif msg.type is aiohttp.WSMsgType.BINARY: await self.received_message(msg.data) elif msg.type is aiohttp.WSMsgType.ERROR: - log.debug('Received %s', msg) + _log.debug('Received %s', msg) raise msg.data elif msg.type in (aiohttp.WSMsgType.CLOSED, aiohttp.WSMsgType.CLOSING, aiohttp.WSMsgType.CLOSE): - log.debug('Received %s', msg) + _log.debug('Received %s', msg) raise WebSocketClosure except (asyncio.TimeoutError, WebSocketClosure) as e: # Ensure the keep alive handler is closed @@ -563,25 +573,29 @@ class DiscordWebSocket: self._keep_alive = None if isinstance(e, asyncio.TimeoutError): - log.info('Timed out receiving packet. Attempting a reconnect.') + _log.info('Timed out receiving packet. Attempting a reconnect.') raise ReconnectWebSocket(self.shard_id) from None code = self._close_code or self.socket.close_code if self._can_handle_close(): - log.info('Websocket closed with %s, attempting a reconnect.', code) + _log.info('Websocket closed with %s, attempting a reconnect.', code) raise ReconnectWebSocket(self.shard_id) from None else: - log.info('Websocket closed with %s, cannot reconnect.', code) + _log.info('Websocket closed with %s, cannot reconnect.', code) raise ConnectionClosed(self.socket, shard_id=self.shard_id, code=code) from None - async def send(self, data): + async def debug_send(self, data, /): await self._rate_limiter.block() self._dispatch('socket_raw_send', data) await self.socket.send_str(data) + async def send(self, data, /): + await self._rate_limiter.block() + await self.socket.send_str(data) + async def send_as_json(self, data): try: - await self.send(utils.to_json(data)) + await self.send(utils._to_json(data)) except RuntimeError as exc: if not self._can_handle_close(): raise ConnectionClosed(self.socket, shard_id=self.shard_id) from exc @@ -589,7 +603,7 @@ class DiscordWebSocket: async def send_heartbeat(self, data): # This bypasses the rate limit handling code since it has a higher priority try: - await self.socket.send_str(utils.to_json(data)) + await self.socket.send_str(utils._to_json(data)) except RuntimeError as exc: if not self._can_handle_close(): raise ConnectionClosed(self.socket, shard_id=self.shard_id) from exc @@ -615,8 +629,8 @@ class DiscordWebSocket: } } - sent = utils.to_json(payload) - log.debug('Sending "%s" to change status', sent) + sent = utils._to_json(payload) + _log.debug('Sending "%s" to change status', sent) await self.send(sent) async def request_chunks(self, guild_id, query=None, *, limit, user_ids=None, presences=False, nonce=None): @@ -652,7 +666,7 @@ class DiscordWebSocket: } } - log.debug('Updating our voice state to %s.', payload) + _log.debug('Updating our voice state to %s.', payload) await self.send_as_json(payload) async def close(self, code=4000): @@ -720,8 +734,8 @@ class DiscordVoiceWebSocket: pass async def send_as_json(self, data): - log.debug('Sending voice websocket frame: %s.', data) - await self.ws.send_str(utils.to_json(data)) + _log.debug('Sending voice websocket frame: %s.', data) + await self.ws.send_str(utils._to_json(data)) send_heartbeat = send_as_json @@ -806,7 +820,7 @@ class DiscordVoiceWebSocket: await self.send_as_json(payload) async def received_message(self, msg): - log.debug('Voice websocket frame received: %s', msg) + _log.debug('Voice websocket frame received: %s', msg) op = msg['op'] data = msg.get('d') @@ -815,7 +829,7 @@ class DiscordVoiceWebSocket: elif op == self.HEARTBEAT_ACK: self._keep_alive.ack() elif op == self.RESUMED: - log.info('Voice RESUME succeeded.') + _log.info('Voice RESUME succeeded.') elif op == self.SESSION_DESCRIPTION: self._connection.mode = data['mode'] await self.load_secret_key(data) @@ -838,7 +852,7 @@ class DiscordVoiceWebSocket: struct.pack_into('>I', packet, 4, state.ssrc) state.socket.sendto(packet, (state.endpoint_ip, state.voice_port)) recv = await self.loop.sock_recv(state.socket, 70) - log.debug('received packet in initial_connection: %s', recv) + _log.debug('received packet in initial_connection: %s', recv) # the ip is ascii starting at the 4th byte and ending at the first null ip_start = 4 @@ -846,15 +860,15 @@ class DiscordVoiceWebSocket: state.ip = recv[ip_start:ip_end].decode('ascii') state.port = struct.unpack_from('>H', recv, len(recv) - 2)[0] - log.debug('detected ip: %s port: %s', state.ip, state.port) + _log.debug('detected ip: %s port: %s', state.ip, state.port) # there *should* always be at least one supported mode (xsalsa20_poly1305) modes = [mode for mode in data['modes'] if mode in self._connection.supported_modes] - log.debug('received supported encryption modes: %s', ", ".join(modes)) + _log.debug('received supported encryption modes: %s', ", ".join(modes)) mode = modes[0] await self.select_protocol(state.ip, state.port, mode) - log.info('selected the voice protocol for use (%s)', mode) + _log.info('selected the voice protocol for use (%s)', mode) @property def latency(self): @@ -872,7 +886,7 @@ class DiscordVoiceWebSocket: return sum(heartbeat.recent_ack_latencies) / len(heartbeat.recent_ack_latencies) async def load_secret_key(self, data): - log.info('received secret key for voice connection') + _log.info('received secret key for voice connection') self.secret_key = self._connection.secret_key = data.get('secret_key') await self.speak() await self.speak(False) @@ -881,12 +895,12 @@ class DiscordVoiceWebSocket: # This exception is handled up the chain msg = await asyncio.wait_for(self.ws.receive(), timeout=30.0) if msg.type is aiohttp.WSMsgType.TEXT: - await self.received_message(utils.from_json(msg.data)) + await self.received_message(utils._from_json(msg.data)) elif msg.type is aiohttp.WSMsgType.ERROR: - log.debug('Received %s', msg) + _log.debug('Received %s', msg) raise ConnectionClosed(self.ws, shard_id=None) from msg.data elif msg.type in (aiohttp.WSMsgType.CLOSED, aiohttp.WSMsgType.CLOSE, aiohttp.WSMsgType.CLOSING): - log.debug('Received %s', msg) + _log.debug('Received %s', msg) raise ConnectionClosed(self.ws, shard_id=None, code=self._close_code) async def close(self, code=1000): diff --git a/discord/guild.py b/discord/guild.py index 6e8aa711..4ed89821 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations import copy +import unicodedata from typing import ( Any, ClassVar, @@ -51,6 +52,7 @@ from .colour import Colour from .errors import InvalidArgument, ClientException from .channel import * from .channel import _guild_channel_factory +from .channel import _threaded_guild_channel_factory from .enums import ( AuditLogAction, VideoQualityMode, @@ -71,7 +73,10 @@ from .asset import Asset from .flags import SystemChannelFlags from .integrations import Integration, _integration_factory from .stage_instance import StageInstance -from .threads import Thread +from .threads import Thread, ThreadMember +from .sticker import GuildSticker +from .file import File + __all__ = ( 'Guild', @@ -107,6 +112,7 @@ class BanEntry(NamedTuple): class _GuildLimit(NamedTuple): emoji: int + stickers: int bitrate: float filesize: int @@ -134,12 +140,20 @@ class Guild(Hashable): Returns the guild's name. + .. describe:: int(x) + + Returns the guild's ID. + Attributes ---------- name: :class:`str` The guild name. emojis: Tuple[:class:`Emoji`, ...] All emojis that the guild owns. + stickers: Tuple[:class:`GuildSticker`, ...] + All stickers that the guild owns. + + .. versionadded:: 2.0 region: :class:`VoiceRegion` The region the guild belongs on. There is a chance that the region will be a :class:`str` if the value is not recognised by the enumerator. @@ -234,6 +248,7 @@ class Guild(Hashable): 'owner_id', 'mfa_level', 'emojis', + 'stickers', 'features', 'verification_level', 'explicit_content_filter', @@ -266,11 +281,11 @@ class Guild(Hashable): ) _PREMIUM_GUILD_LIMITS: ClassVar[Dict[Optional[int], _GuildLimit]] = { - None: _GuildLimit(emoji=50, bitrate=96e3, filesize=8388608), - 0: _GuildLimit(emoji=50, bitrate=96e3, filesize=8388608), - 1: _GuildLimit(emoji=100, bitrate=128e3, filesize=8388608), - 2: _GuildLimit(emoji=150, bitrate=256e3, filesize=52428800), - 3: _GuildLimit(emoji=250, bitrate=384e3, filesize=104857600), + None: _GuildLimit(emoji=50, stickers=0, bitrate=96e3, filesize=8388608), + 0: _GuildLimit(emoji=50, stickers=0, bitrate=96e3, filesize=8388608), + 1: _GuildLimit(emoji=100, stickers=15, bitrate=128e3, filesize=8388608), + 2: _GuildLimit(emoji=150, stickers=30, bitrate=256e3, filesize=52428800), + 3: _GuildLimit(emoji=250, stickers=60, bitrate=384e3, filesize=104857600), } def __init__(self, *, data: GuildPayload, state: ConnectionState): @@ -412,6 +427,9 @@ class Guild(Hashable): self.mfa_level: MFALevel = guild.get('mfa_level') self.emojis: Tuple[Emoji, ...] = tuple(map(lambda d: state.store_emoji(self, d), guild.get('emojis', []))) + self.stickers: Tuple[GuildSticker, ...] = tuple( + map(lambda d: state.store_sticker(self, d), guild.get('stickers', [])) + ) self.features: List[GuildFeature] = guild.get('features', []) self._splash: Optional[str] = guild.get('splash') self._system_channel_id: Optional[int] = utils._get_as_snowflake(guild, 'system_channel_id') @@ -599,6 +617,23 @@ class Guild(Hashable): return self._channels.get(id) or self._threads.get(id) + def get_channel_or_thread(self, channel_id: int, /) -> Optional[Union[Thread, GuildChannel]]: + """Returns a channel or thread with the given ID. + + .. versionadded:: 2.0 + + Parameters + ----------- + channel_id: :class:`int` + The ID to search for. + + Returns + -------- + Optional[Union[:class:`Thread`, :class:`.abc.GuildChannel`]] + The returned channel or thread or ``None`` if not found. + """ + return self._channels.get(channel_id) or self._threads.get(channel_id) + def get_channel(self, channel_id: int, /) -> Optional[GuildChannel]: """Returns a channel with the given ID. @@ -680,6 +715,15 @@ class Guild(Hashable): more_emoji = 200 if 'MORE_EMOJI' in self.features else 50 return max(more_emoji, self._PREMIUM_GUILD_LIMITS[self.premium_tier].emoji) + @property + def sticker_limit(self) -> int: + """:class:`int`: The maximum number of sticker slots this guild has. + + .. versionadded:: 2.0 + """ + more_stickers = 60 if 'MORE_STICKERS' in self.features else 0 + return max(more_stickers, self._PREMIUM_GUILD_LIMITS[self.premium_tier].stickers) + @property def bitrate_limit(self) -> float: """:class:`float`: The maximum bitrate for voice channels this guild can have.""" @@ -696,7 +740,21 @@ class Guild(Hashable): """List[:class:`Member`]: A list of members that belong to this guild.""" return list(self._members.values()) - def get_member(self, user_id: int) -> Optional[Member]: + @property + def humans(self) -> List[Member]: + """List[:class:`Member`]: A list of human members that belong to this guild. + + .. versionadded:: 2.0 """ + return [member for member in self.members if not member.bot] + + @property + def bots(self) -> List[Member]: + """List[:class:`Member`]: A list of bots that belong to this guild. + + .. versionadded:: 2.0 """ + return [member for member in self.members if member.bot] + + def get_member(self, user_id: int, /) -> Optional[Member]: """Returns a member with the given ID. Parameters @@ -1316,7 +1374,7 @@ class Guild(Hashable): preferred_locale: str = MISSING, rules_channel: Optional[TextChannel] = MISSING, public_updates_channel: Optional[TextChannel] = MISSING, - ) -> None: + ) -> Guild: r"""|coro| Edits the guild. @@ -1330,6 +1388,9 @@ class Guild(Hashable): .. versionchanged:: 2.0 The `discovery_splash` and `community` keyword-only parameters were added. + .. versionchanged:: 2.0 + The newly updated guild is returned. + Parameters ---------- name: :class:`str` @@ -1403,6 +1464,12 @@ class Guild(Hashable): 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. + + Returns + -------- + :class:`Guild` + The newly updated guild. Note that this has the same limitations as + mentioned in :meth:`Client.fetch_guild` and may not have full data. """ http = self._state.http @@ -1515,7 +1582,8 @@ class Guild(Hashable): fields['features'] = features - await http.edit_guild(self.id, reason=reason, **fields) + data = await http.edit_guild(self.id, reason=reason, **fields) + return Guild(data=data, state=self._state) async def fetch_channels(self) -> Sequence[GuildChannel]: """|coro| @@ -1552,6 +1620,35 @@ class Guild(Hashable): return [convert(d) for d in data] + async def active_threads(self) -> List[Thread]: + """|coro| + + Returns a list of active :class:`Thread` that the client can access. + + This includes both private and public threads. + + .. versionadded:: 2.0 + + Raises + ------ + HTTPException + The request to get the active threads failed. + + Returns + -------- + List[:class:`Thread`] + The active threads + """ + data = await self._state.http.get_active_threads(self.id) + threads = [Thread(guild=self, state=self._state, data=d) for d in data.get('threads', [])] + thread_lookup: Dict[int, Thread] = {thread.id: thread for thread in threads} + for member in data.get('members', []): + thread = thread_lookup.get(int(member['id'])) + if thread is not None: + thread._add_member(ThreadMember(parent=thread, data=member)) + + return threads + # TODO: Remove Optional typing here when async iterators are refactored def fetch_members(self, *, limit: int = 1000, after: Optional[SnowflakeTime] = None) -> MemberIterator: """Retrieves an :class:`.AsyncIterator` that enables receiving the guild's members. In order to use this, @@ -1665,14 +1762,14 @@ class Guild(Hashable): data: BanPayload = await self._state.http.get_ban(user.id, self.id) return BanEntry(user=User(state=self._state, data=data['user']), reason=data['reason']) - async def fetch_channel(self, channel_id: int, /) -> GuildChannel: + async def fetch_channel(self, channel_id: int, /) -> Union[GuildChannel, Thread]: """|coro| - Retrieves a :class:`.abc.GuildChannel` with the specified ID. + Retrieves a :class:`.abc.GuildChannel` or :class:`.Thread` with the specified ID. .. note:: - This method is an API call. For general usage, consider :meth:`get_channel` instead. + This method is an API call. For general usage, consider :meth:`get_channel_or_thread` instead. .. versionadded:: 2.0 @@ -1691,12 +1788,12 @@ class Guild(Hashable): Returns -------- - :class:`.abc.GuildChannel` + Union[:class:`.abc.GuildChannel`, :class:`.Thread`] The channel from the ID. """ data = await self._state.http.get_channel(channel_id) - factory, ch_type = _guild_channel_factory(data['type']) + factory, ch_type = _threaded_guild_channel_factory(data['type']) if factory is None: raise InvalidData('Unknown channel type {type} for channel ID {id}.'.format_map(data)) @@ -2009,6 +2106,150 @@ class Guild(Hashable): return [convert(d) for d in data] + async def fetch_stickers(self) -> List[GuildSticker]: + r"""|coro| + + Retrieves a list of all :class:`Sticker`\s for the guild. + + .. versionadded:: 2.0 + + .. note:: + + This method is an API call. For general usage, consider :attr:`stickers` instead. + + Raises + --------- + HTTPException + An error occurred fetching the stickers. + + Returns + -------- + List[:class:`GuildSticker`] + The retrieved stickers. + """ + data = await self._state.http.get_all_guild_stickers(self.id) + return [GuildSticker(state=self._state, data=d) for d in data] + + async def fetch_sticker(self, sticker_id: int, /) -> GuildSticker: + """|coro| + + Retrieves a custom :class:`Sticker` from the guild. + + .. versionadded:: 2.0 + + .. note:: + + This method is an API call. + For general usage, consider iterating over :attr:`stickers` instead. + + Parameters + ------------- + sticker_id: :class:`int` + The sticker's ID. + + Raises + --------- + NotFound + The sticker requested could not be found. + HTTPException + An error occurred fetching the sticker. + + Returns + -------- + :class:`GuildSticker` + The retrieved sticker. + """ + data = await self._state.http.get_guild_sticker(self.id, sticker_id) + return GuildSticker(state=self._state, data=data) + + async def create_sticker( + self, + *, + name: str, + description: Optional[str] = None, + emoji: str, + file: File, + reason: Optional[str] = None, + ) -> GuildSticker: + """|coro| + + Creates a :class:`Sticker` for the guild. + + You must have :attr:`~Permissions.manage_emojis_and_stickers` permission to + do this. + + .. versionadded:: 2.0 + + Parameters + ----------- + name: :class:`str` + The sticker name. Must be at least 2 characters. + description: Optional[:class:`str`] + The sticker's description. Can be ``None``. + emoji: :class:`str` + The name of a unicode emoji that represents the sticker's expression. + file: :class:`File` + The file of the sticker to upload. + reason: :class:`str` + The reason for creating this sticker. Shows up on the audit log. + + Raises + ------- + Forbidden + You are not allowed to create stickers. + HTTPException + An error occurred creating a sticker. + + Returns + -------- + :class:`GuildSticker` + The created sticker. + """ + payload = { + 'name': name, + } + + if description: + payload['description'] = description + + try: + emoji = unicodedata.name(emoji) + except TypeError: + pass + else: + emoji = emoji.replace(' ', '_') + + payload['tags'] = emoji + + data = await self._state.http.create_guild_sticker(self.id, payload, file, reason) + return self._state.store_sticker(self, data) + + async def delete_sticker(self, sticker: Snowflake, *, reason: Optional[str] = None) -> None: + """|coro| + + Deletes the custom :class:`Sticker` from the guild. + + You must have :attr:`~Permissions.manage_emojis_and_stickers` permission to + do this. + + .. versionadded:: 2.0 + + Parameters + ----------- + sticker: :class:`abc.Snowflake` + The sticker you are deleting. + reason: Optional[:class:`str`] + The reason for deleting this sticker. Shows up on the audit log. + + Raises + ------- + Forbidden + You are not allowed to delete stickers. + HTTPException + An error occurred deleting the sticker. + """ + await self._state.http.delete_guild_sticker(self.id, sticker.id, reason) + async def fetch_emojis(self) -> List[Emoji]: r"""|coro| diff --git a/discord/http.py b/discord/http.py index 865100d8..7a4c2adc 100644 --- a/discord/http.py +++ b/discord/http.py @@ -33,7 +33,6 @@ from typing import ( ClassVar, Coroutine, Dict, - Final, Iterable, List, Optional, @@ -49,12 +48,12 @@ import weakref import aiohttp -from .errors import HTTPException, Forbidden, NotFound, LoginFailure, DiscordServerError, GatewayNotFound +from .errors import HTTPException, Forbidden, NotFound, LoginFailure, DiscordServerError, GatewayNotFound, InvalidArgument from .gateway import DiscordClientWebSocketResponse from . import __version__, utils from .utils import MISSING -log = logging.getLogger(__name__) +_log = logging.getLogger(__name__) if TYPE_CHECKING: from .file import File @@ -84,6 +83,7 @@ if TYPE_CHECKING: widget, threads, voice, + sticker, ) from .types.snowflake import Snowflake, SnowflakeList @@ -99,7 +99,7 @@ async def json_or_text(response: aiohttp.ClientResponse) -> Union[Dict[str, Any] text = await response.text(encoding='utf-8') try: if response.headers['content-type'] == 'application/json': - return utils.from_json(text) + return utils._from_json(text) except KeyError: # Thanks Cloudflare pass @@ -141,7 +141,8 @@ class MaybeUnlock: def defer(self) -> None: self._unlock = False - def __exit__(self, + def __exit__( + self, exc_type: Optional[Type[BE]], exc: Optional[BE], traceback: Optional[TracebackType], @@ -152,15 +153,12 @@ class MaybeUnlock: # For some reason, the Discord voice websocket expects this header to be # completely lowercase while aiohttp respects spec and does it as case-insensitive -aiohttp.hdrs.WEBSOCKET = 'websocket' #type: ignore +aiohttp.hdrs.WEBSOCKET = 'websocket' # type: ignore class HTTPClient: """Represents an HTTP client sending HTTP requests to the Discord API.""" - SUCCESS_LOG: Final[ClassVar[str]] = '{method} {url} has received {text}' - REQUEST_LOG: Final[ClassVar[str]] = '{method} {url} with {json} has returned {status}' - def __init__( self, connector: Optional[aiohttp.BaseConnector] = None, @@ -168,7 +166,7 @@ class HTTPClient: proxy: Optional[str] = None, proxy_auth: Optional[aiohttp.BasicAuth] = None, loop: Optional[asyncio.AbstractEventLoop] = None, - unsync_clock: bool = True + unsync_clock: bool = True, ) -> None: self.loop: asyncio.AbstractEventLoop = asyncio.get_event_loop() if loop is None else loop self.connector = connector @@ -212,7 +210,7 @@ class HTTPClient: *, files: Optional[Sequence[File]] = None, form: Optional[Iterable[Dict[str, Any]]] = None, - **kwargs: Any + **kwargs: Any, ) -> Any: bucket = route.bucket method = route.method @@ -234,7 +232,7 @@ class HTTPClient: # some checking if it's a JSON request if 'json' in kwargs: headers['Content-Type'] = 'application/json' - kwargs['data'] = utils.to_json(kwargs.pop('json')) + kwargs['data'] = utils._to_json(kwargs.pop('json')) try: reason = kwargs.pop('reason') @@ -273,7 +271,7 @@ class HTTPClient: try: async with self.__session.request(method, url, **kwargs) as response: - log.debug('%s %s with %s has returned %s', method, url, kwargs.get('data'), response.status) + _log.debug('%s %s with %s has returned %s', method, url, kwargs.get('data'), response.status) # even errors have text involved in them so this is safe to call data = await json_or_text(response) @@ -283,13 +281,13 @@ class HTTPClient: if remaining == '0' and response.status != 429: # we've depleted our current bucket delta = utils._parse_ratelimit_header(response, use_clock=self.use_clock) - log.debug('A rate limit bucket has been exhausted (bucket: %s, retry: %s).', bucket, delta) + _log.debug('A rate limit bucket has been exhausted (bucket: %s, retry: %s).', bucket, delta) maybe_lock.defer() self.loop.call_later(delta, lock.release) # the request was successful so just return the text/json if 300 > response.status >= 200: - log.debug('%s %s has received %s', method, url, data) + _log.debug('%s %s has received %s', method, url, data) return data # we are being rate limited @@ -302,22 +300,22 @@ class HTTPClient: # sleep a bit retry_after: float = data['retry_after'] - log.warning(fmt, retry_after, bucket) + _log.warning(fmt, retry_after, bucket) # check if it's a global rate limit is_global = data.get('global', False) if is_global: - log.warning('Global rate limit has been hit. Retrying in %.2f seconds.', retry_after) + _log.warning('Global rate limit has been hit. Retrying in %.2f seconds.', retry_after) self._global_over.clear() await asyncio.sleep(retry_after) - log.debug('Done sleeping for the rate limit. Retrying...') + _log.debug('Done sleeping for the rate limit. Retrying...') # release the global lock now that the # global rate limit has passed if is_global: self._global_over.set() - log.debug('Global rate limit is now over.') + _log.debug('Global rate limit is now over.') continue @@ -415,14 +413,15 @@ class HTTPClient: def send_message( self, channel_id: Snowflake, - content: str, + content: Optional[str], *, tts: bool = False, embed: Optional[embed.Embed] = None, embeds: Optional[List[embed.Embed]] = None, - nonce: Optional[str] = None, + nonce: Optional[str] = None, allowed_mentions: Optional[message.AllowedMentions] = None, message_reference: Optional[message.MessageReference] = None, + stickers: Optional[List[sticker.StickerItem]] = None, components: Optional[List[components.Component]] = None, ) -> Response[message.Message]: r = Route('POST', '/channels/{channel_id}/messages', channel_id=channel_id) @@ -436,7 +435,7 @@ class HTTPClient: if embed: payload['embeds'] = [embed] - + if embeds: payload['embeds'] = embeds @@ -452,6 +451,9 @@ class HTTPClient: if components: payload['components'] = components + if stickers: + payload['sticker_ids'] = stickers + return self.request(r, json=payload) def send_typing(self, channel_id: Snowflake) -> Response[None]: @@ -465,10 +467,11 @@ class HTTPClient: content: Optional[str] = None, tts: bool = False, embed: Optional[embed.Embed] = None, - embeds: Iterable[Optional[embed.Embed]] = None, + embeds: Optional[Iterable[Optional[embed.Embed]]] = None, nonce: Optional[str] = None, allowed_mentions: Optional[message.AllowedMentions] = None, message_reference: Optional[message.MessageReference] = None, + stickers: Optional[List[sticker.StickerItem]] = None, components: Optional[List[components.Component]] = None, ) -> Response[message.Message]: form = [] @@ -488,8 +491,10 @@ class HTTPClient: payload['message_reference'] = message_reference if components: payload['components'] = components + if stickers: + payload['sticker_ids'] = stickers - form.append({'name': 'payload_json', 'value': utils.to_json(payload)}) + form.append({'name': 'payload_json', 'value': utils._to_json(payload)}) if len(files) == 1: file = files[0] form.append( @@ -525,6 +530,7 @@ class HTTPClient: nonce: Optional[str] = None, allowed_mentions: Optional[message.AllowedMentions] = None, message_reference: Optional[message.MessageReference] = None, + stickers: Optional[List[sticker.StickerItem]] = None, components: Optional[List[components.Component]] = None, ) -> Response[message.Message]: r = Route('POST', '/channels/{channel_id}/messages', channel_id=channel_id) @@ -538,14 +544,19 @@ class HTTPClient: nonce=nonce, allowed_mentions=allowed_mentions, message_reference=message_reference, + stickers=stickers, components=components, ) - def delete_message(self, channel_id: Snowflake, message_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]: + def delete_message( + self, channel_id: Snowflake, message_id: Snowflake, *, reason: Optional[str] = None + ) -> Response[None]: r = Route('DELETE', '/channels/{channel_id}/messages/{message_id}', channel_id=channel_id, message_id=message_id) return self.request(r, reason=reason) - def delete_messages(self, channel_id: Snowflake, message_ids: SnowflakeList, *, reason: Optional[str] = None) -> Response[None]: + def delete_messages( + self, channel_id: Snowflake, message_ids: SnowflakeList, *, reason: Optional[str] = None + ) -> Response[None]: r = Route('POST', '/channels/{channel_id}/messages/bulk-delete', channel_id=channel_id) payload = { 'messages': message_ids, @@ -567,7 +578,9 @@ class HTTPClient: ) return self.request(r) - def remove_reaction(self, channel_id: Snowflake, message_id: Snowflake, emoji: str, member_id: Snowflake) -> Response[None]: + def remove_reaction( + self, channel_id: Snowflake, message_id: Snowflake, emoji: str, member_id: Snowflake + ) -> Response[None]: r = Route( 'DELETE', '/channels/{channel_id}/messages/{message_id}/reactions/{emoji}/{member_id}', @@ -713,11 +726,7 @@ class HTTPClient: 'delete_message_days': delete_message_days, } - if reason: - # thanks aiohttp - r.url = f'{r.url}?reason={_uriquote(reason)}' - - return self.request(r, params=params) + return self.request(r, params=params, reason=reason) def unban(self, user_id: Snowflake, guild_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]: r = Route('DELETE', '/guilds/{guild_id}/bans/{user_id}', guild_id=guild_id, user_id=user_id) @@ -772,11 +781,11 @@ class HTTPClient: } return self.request(r, json=payload, reason=reason) - def edit_my_voice_state(self, guild_id: Snowflake, payload: voice.VoiceState) -> Response[None]: + def edit_my_voice_state(self, guild_id: Snowflake, payload: Dict[str, Any]) -> Response[None]: r = Route('PATCH', '/guilds/{guild_id}/voice-states/@me', guild_id=guild_id) return self.request(r, json=payload) - def edit_voice_state(self, guild_id: Snowflake, user_id: Snowflake, payload: voice.VoiceState) -> Response[None]: + def edit_voice_state(self, guild_id: Snowflake, user_id: Snowflake, payload: Dict[str, Any]) -> Response[None]: r = Route('PATCH', '/guilds/{guild_id}/voice-states/{user_id}', guild_id=guild_id, user_id=user_id) return self.request(r, json=payload) @@ -787,7 +796,7 @@ class HTTPClient: *, reason: Optional[str] = None, **fields: Any, - ) -> Response[member.Member]: + ) -> Response[member.MemberWithUser]: r = Route('PATCH', '/guilds/{guild_id}/members/{user_id}', guild_id=guild_id, user_id=user_id) return self.request(r, json=fields, reason=reason) @@ -817,6 +826,8 @@ class HTTPClient: 'archived', 'auto_archive_duration', 'locked', + 'invitable', + 'default_auto_archive_duration', ) payload = {k: v for k, v in options.items() if k in valid_keys} return self.request(r, reason=reason, json=payload) @@ -871,42 +882,44 @@ class HTTPClient: # Thread management - def start_public_thread( + def start_thread_with_message( self, channel_id: Snowflake, message_id: Snowflake, *, name: str, auto_archive_duration: threads.ThreadArchiveDuration, - type: threads.ThreadType, + reason: Optional[str] = None, ) -> Response[threads.Thread]: payload = { 'name': name, 'auto_archive_duration': auto_archive_duration, - 'type': type, } route = Route( 'POST', '/channels/{channel_id}/messages/{message_id}/threads', channel_id=channel_id, message_id=message_id ) - return self.request(route, json=payload) + return self.request(route, json=payload, reason=reason) - def start_private_thread( + def start_thread_without_message( self, channel_id: Snowflake, *, name: str, auto_archive_duration: threads.ThreadArchiveDuration, type: threads.ThreadType, + invitable: bool = True, + reason: Optional[str] = None, ) -> Response[threads.Thread]: payload = { 'name': name, 'auto_archive_duration': auto_archive_duration, 'type': type, + 'invitable': invitable, } route = Route('POST', '/channels/{channel_id}/threads', channel_id=channel_id) - return self.request(route, json=payload) + return self.request(route, json=payload, reason=reason) def join_thread(self, channel_id: Snowflake) -> Response[None]: return self.request(Route('POST', '/channels/{channel_id}/thread-members/@me', channel_id=channel_id)) @@ -955,8 +968,8 @@ class HTTPClient: params['limit'] = limit return self.request(route, params=params) - def get_active_threads(self, channel_id: Snowflake) -> Response[threads.ThreadPaginationPayload]: - route = Route('GET', '/channels/{channel_id}/threads/active', channel_id=channel_id) + def get_active_threads(self, guild_id: Snowflake) -> Response[threads.ThreadPaginationPayload]: + route = Route('GET', '/guilds/{guild_id}/threads/active', guild_id=guild_id) return self.request(route) def get_thread_members(self, channel_id: Snowflake) -> Response[List[threads.ThreadMember]]: @@ -1119,7 +1132,9 @@ class HTTPClient: def get_all_guild_channels(self, guild_id: Snowflake) -> Response[List[guild.GuildChannel]]: return self.request(Route('GET', '/guilds/{guild_id}/channels', guild_id=guild_id)) - def get_members(self, guild_id: Snowflake, limit: int, after: Optional[Snowflake]) -> Response[List[member.Member]]: + def get_members( + self, guild_id: Snowflake, limit: int, after: Optional[Snowflake] + ) -> Response[List[member.MemberWithUser]]: params: Dict[str, Any] = { 'limit': limit, } @@ -1129,7 +1144,7 @@ class HTTPClient: r = Route('GET', '/guilds/{guild_id}/members', guild_id=guild_id) return self.request(r, params=params) - def get_member(self, guild_id: Snowflake, member_id: Snowflake) -> Response[member.Member]: + def get_member(self, guild_id: Snowflake, member_id: Snowflake) -> Response[member.MemberWithUser]: return self.request(Route('GET', '/guilds/{guild_id}/members/{member_id}', guild_id=guild_id, member_id=member_id)) def prune_members( @@ -1164,6 +1179,71 @@ class HTTPClient: return self.request(Route('GET', '/guilds/{guild_id}/prune', guild_id=guild_id), params=params) + def get_sticker(self, sticker_id: Snowflake) -> Response[sticker.Sticker]: + return self.request(Route('GET', '/stickers/{sticker_id}', sticker_id=sticker_id)) + + def list_premium_sticker_packs(self) -> Response[sticker.ListPremiumStickerPacks]: + return self.request(Route('GET', '/sticker-packs')) + + def get_all_guild_stickers(self, guild_id: Snowflake) -> Response[List[sticker.GuildSticker]]: + return self.request(Route('GET', '/guilds/{guild_id}/stickers', guild_id=guild_id)) + + def get_guild_sticker(self, guild_id: Snowflake, sticker_id: Snowflake) -> Response[sticker.GuildSticker]: + return self.request( + Route('GET', '/guilds/{guild_id}/stickers/{sticker_id}', guild_id=guild_id, sticker_id=sticker_id) + ) + + def create_guild_sticker( + self, guild_id: Snowflake, payload: sticker.CreateGuildSticker, file: File, reason: str + ) -> Response[sticker.GuildSticker]: + initial_bytes = file.fp.read(16) + + try: + mime_type = utils._get_mime_type_for_image(initial_bytes) + except InvalidArgument: + if initial_bytes.startswith(b'{'): + mime_type = 'application/json' + else: + mime_type = 'application/octet-stream' + finally: + file.reset() + + form: List[Dict[str, Any]] = [ + { + 'name': 'file', + 'value': file.fp, + 'filename': file.filename, + 'content_type': mime_type, + } + ] + + for k, v in payload.items(): + form.append( + { + 'name': k, + 'value': v, + } + ) + + return self.request( + Route('POST', '/guilds/{guild_id}/stickers', guild_id=guild_id), form=form, files=[file], reason=reason + ) + + def modify_guild_sticker( + self, guild_id: Snowflake, sticker_id: Snowflake, payload: sticker.EditGuildSticker, reason: Optional[str], + ) -> Response[sticker.GuildSticker]: + return self.request( + Route('PATCH', '/guilds/{guild_id}/stickers/{sticker_id}', guild_id=guild_id, sticker_id=sticker_id), + json=payload, + reason=reason, + ) + + def delete_guild_sticker(self, guild_id: Snowflake, sticker_id: Snowflake, reason: Optional[str]) -> Response[None]: + return self.request( + Route('DELETE', '/guilds/{guild_id}/stickers/{sticker_id}', guild_id=guild_id, sticker_id=sticker_id), + reason=reason, + ) + def get_all_custom_emojis(self, guild_id: Snowflake) -> Response[List[emoji.Emoji]]: return self.request(Route('GET', '/guilds/{guild_id}/emojis', guild_id=guild_id)) @@ -1237,12 +1317,14 @@ class HTTPClient: return self.request(r) - def delete_integration(self, guild_id: Snowflake, integration_id: Snowflake) -> Response[None]: + def delete_integration( + self, guild_id: Snowflake, integration_id: Snowflake, *, reason: Optional[str] = None + ) -> Response[None]: r = Route( 'DELETE', '/guilds/{guild_id}/integrations/{integration_id}', guild_id=guild_id, integration_id=integration_id ) - return self.request(r) + return self.request(r, reason=reason) def get_audit_logs( self, @@ -1285,7 +1367,7 @@ class HTTPClient: unique: bool = True, target_type: Optional[invite.InviteTargetType] = None, target_user_id: Optional[Snowflake] = None, - target_application_id: Optional[Snowflake] = None + target_application_id: Optional[Snowflake] = None, ) -> Response[invite.Invite]: r = Route('POST', '/channels/{channel_id}/invites', channel_id=channel_id) payload = { @@ -1306,7 +1388,9 @@ class HTTPClient: return self.request(r, reason=reason, json=payload) - def get_invite(self, invite_id: str, *, with_counts: bool = True, with_expiration: bool = True) -> Response[invite.Invite]: + def get_invite( + self, invite_id: str, *, with_counts: bool = True, with_expiration: bool = True + ) -> Response[invite.Invite]: params = { 'with_counts': int(with_counts), 'with_expiration': int(with_expiration), @@ -1327,7 +1411,9 @@ class HTTPClient: def get_roles(self, guild_id: Snowflake) -> Response[List[role.Role]]: return self.request(Route('GET', '/guilds/{guild_id}/roles', guild_id=guild_id)) - def edit_role(self, guild_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None, **fields: Any) -> Response[role.Role]: + def edit_role( + self, guild_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None, **fields: Any + ) -> Response[role.Role]: r = Route('PATCH', '/guilds/{guild_id}/roles/{role_id}', guild_id=guild_id, role_id=role_id) valid_keys = ('name', 'permissions', 'color', 'hoist', 'mentionable') payload = {k: v for k, v in fields.items() if k in valid_keys} @@ -1344,7 +1430,7 @@ class HTTPClient: role_ids: List[int], *, reason: Optional[str] = None, - ) -> Response[member.Member]: + ) -> Response[member.MemberWithUser]: return self.edit_member(guild_id=guild_id, user_id=user_id, roles=role_ids, reason=reason) def create_role(self, guild_id: Snowflake, *, reason: Optional[str] = None, **fields: Any) -> Response[role.Role]: @@ -1361,7 +1447,9 @@ class HTTPClient: r = Route('PATCH', '/guilds/{guild_id}/roles', guild_id=guild_id) return self.request(r, json=positions, reason=reason) - def add_role(self, guild_id: Snowflake, user_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]: + def add_role( + self, guild_id: Snowflake, user_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None + ) -> Response[None]: r = Route( 'PUT', '/guilds/{guild_id}/members/{user_id}/roles/{role_id}', @@ -1371,7 +1459,9 @@ class HTTPClient: ) return self.request(r, reason=reason) - def remove_role(self, guild_id: Snowflake, user_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]: + def remove_role( + self, guild_id: Snowflake, user_id: Snowflake, role_id: Snowflake, *, reason: Optional[str] = None + ) -> Response[None]: r = Route( 'DELETE', '/guilds/{guild_id}/members/{user_id}/roles/{role_id}', @@ -1396,11 +1486,7 @@ class HTTPClient: return self.request(r, json=payload, reason=reason) def delete_channel_permissions( - self, - channel_id: Snowflake, - target: channel.OverwriteType, - *, - reason: Optional[str] = None + self, channel_id: Snowflake, target: channel.OverwriteType, *, reason: Optional[str] = None ) -> Response[None]: r = Route('DELETE', '/channels/{channel_id}/permissions/{target}', channel_id=channel_id, target=target) return self.request(r, reason=reason) @@ -1414,7 +1500,7 @@ class HTTPClient: channel_id: Snowflake, *, reason: Optional[str] = None, - ) -> Response[member.Member]: + ) -> Response[member.MemberWithUser]: return self.edit_member(guild_id=guild_id, user_id=user_id, channel_id=channel_id, reason=reason) # Stage instance management @@ -1422,7 +1508,7 @@ class HTTPClient: def get_stage_instance(self, channel_id: Snowflake) -> Response[channel.StageInstance]: return self.request(Route('GET', '/stage-instances/{channel_id}', channel_id=channel_id)) - def create_stage_instance(self, **payload) -> Response[channel.StageInstance]: + def create_stage_instance(self, *, reason: Optional[str], **payload: Any) -> Response[channel.StageInstance]: valid_keys = ( 'channel_id', 'topic', @@ -1430,26 +1516,30 @@ class HTTPClient: ) payload = {k: v for k, v in payload.items() if k in valid_keys} - return self.request(Route('POST', '/stage-instances'), json=payload) + return self.request(Route('POST', '/stage-instances'), json=payload, reason=reason) - def edit_stage_instance(self, channel_id: Snowflake, **payload) -> Response[None]: + def edit_stage_instance(self, channel_id: Snowflake, *, reason: Optional[str] = None, **payload: Any) -> Response[None]: valid_keys = ( 'topic', 'privacy_level', ) payload = {k: v for k, v in payload.items() if k in valid_keys} - return self.request(Route('PATCH', '/stage-instances/{channel_id}', channel_id=channel_id), json=payload) + return self.request( + Route('PATCH', '/stage-instances/{channel_id}', channel_id=channel_id), json=payload, reason=reason + ) - def delete_stage_instance(self, channel_id: Snowflake) -> Response[None]: - return self.request(Route('DELETE', '/stage-instances/{channel_id}', channel_id=channel_id)) + def delete_stage_instance(self, channel_id: Snowflake, *, reason: Optional[str] = None) -> Response[None]: + return self.request(Route('DELETE', '/stage-instances/{channel_id}', channel_id=channel_id), reason=reason) # Application commands (global) def get_global_commands(self, application_id: Snowflake) -> Response[List[interactions.ApplicationCommand]]: return self.request(Route('GET', '/applications/{application_id}/commands', application_id=application_id)) - def get_global_command(self, application_id: Snowflake, command_id: Snowflake) -> Response[interactions.ApplicationCommand]: + def get_global_command( + self, application_id: Snowflake, command_id: Snowflake + ) -> Response[interactions.ApplicationCommand]: r = Route( 'GET', '/applications/{application_id}/commands/{command_id}', @@ -1462,7 +1552,8 @@ class HTTPClient: r = Route('POST', '/applications/{application_id}/commands', application_id=application_id) return self.request(r, json=payload) - def edit_global_command(self, + def edit_global_command( + self, application_id: Snowflake, command_id: Snowflake, payload: interactions.EditApplicationCommand, @@ -1490,13 +1581,17 @@ class HTTPClient: ) return self.request(r) - def bulk_upsert_global_commands(self, application_id: Snowflake, payload) -> Response[List[interactions.ApplicationCommand]]: + def bulk_upsert_global_commands( + self, application_id: Snowflake, payload + ) -> Response[List[interactions.ApplicationCommand]]: r = Route('PUT', '/applications/{application_id}/commands', application_id=application_id) return self.request(r, json=payload) # Application commands (guild) - def get_guild_commands(self, application_id: Snowflake, guild_id: Snowflake) -> Response[List[interactions.ApplicationCommand]]: + def get_guild_commands( + self, application_id: Snowflake, guild_id: Snowflake + ) -> Response[List[interactions.ApplicationCommand]]: r = Route( 'GET', '/applications/{application_id}/guilds/{guild_id}/commands', @@ -1534,7 +1629,8 @@ class HTTPClient: ) return self.request(r, json=payload) - def edit_guild_command(self, + def edit_guild_command( + self, application_id: Snowflake, guild_id: Snowflake, command_id: Snowflake, @@ -1571,9 +1667,9 @@ class HTTPClient: return self.request(r) def bulk_upsert_guild_commands( - self, + self, application_id: Snowflake, - guild_id: Snowflake, + guild_id: Snowflake, payload: List[interactions.EditApplicationCommand], ) -> Response[List[interactions.ApplicationCommand]]: r = Route( @@ -1606,7 +1702,7 @@ class HTTPClient: form: List[Dict[str, Any]] = [ { 'name': 'payload_json', - 'value': utils.to_json(payload), + 'value': utils._to_json(payload), } ] @@ -1628,7 +1724,7 @@ class HTTPClient: token: str, *, type: InteractionResponseType, - data: Optional[interactions.InteractionApplicationCommandCallbackData] = None + data: Optional[interactions.InteractionApplicationCommandCallbackData] = None, ) -> Response[None]: r = Route( 'POST', @@ -1718,7 +1814,7 @@ class HTTPClient: content: Optional[str] = None, embeds: Optional[List[embed.Embed]] = None, allowed_mentions: Optional[message.AllowedMentions] = None, - )-> Response[message.Message]: + ) -> Response[message.Message]: r = Route( 'PATCH', '/webhooks/{application_id}/{interaction_token}/messages/{message_id}', diff --git a/discord/integrations.py b/discord/integrations.py index e2d6e116..23d02930 100644 --- a/discord/integrations.py +++ b/discord/integrations.py @@ -127,7 +127,7 @@ class Integration: self.user = User(state=self._state, data=user) if user else None self.enabled: bool = data['enabled'] - async def delete(self) -> None: + async def delete(self, *, reason: Optional[str] = None) -> None: """|coro| Deletes the integration. @@ -135,6 +135,13 @@ class Integration: You must have the :attr:`~Permissions.manage_guild` permission to do this. + Parameters + ----------- + reason: :class:`str` + The reason the integration was deleted. Shows up on the audit log. + + .. versionadded:: 2.0 + Raises ------- Forbidden @@ -142,7 +149,7 @@ class Integration: HTTPException Deleting the integration failed. """ - await self._state.http.delete_integration(self.guild.id, self.id) + await self._state.http.delete_integration(self.guild.id, self.id, reason=reason) class StreamIntegration(Integration): @@ -255,17 +262,10 @@ class StreamIntegration(Integration): if enable_emoticons is not MISSING: payload['enable_emoticons'] = enable_emoticons + # This endpoint is undocumented. + # Unsure if it returns the data or not as a result await self._state.http.edit_integration(self.guild.id, self.id, **payload) - if expire_behaviour is not MISSING: - self.expire_behaviour = expire_behaviour - - if enable_emoticons is not MISSING: - self.enable_emoticons = enable_emoticons - - if expire_grace_period is not MISSING: - self.expire_grace_period = expire_grace_period - async def sync(self) -> None: """|coro| diff --git a/discord/interactions.py b/discord/interactions.py index 217e107f..b89d49f5 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -31,6 +31,7 @@ import asyncio from . import utils from .enums import try_enum, InteractionType, InteractionResponseType from .errors import InteractionResponded, HTTPException, ClientException +from .channel import PartialMessageable, ChannelType from .user import User from .member import Member @@ -57,10 +58,12 @@ if TYPE_CHECKING: from aiohttp import ClientSession from .embeds import Embed from .ui.view import View - from .channel import VoiceChannel, StageChannel, TextChannel, CategoryChannel, StoreChannel + from .channel import VoiceChannel, StageChannel, TextChannel, CategoryChannel, StoreChannel, PartialMessageable from .threads import Thread - InteractionChannel = Union[VoiceChannel, StageChannel, TextChannel, CategoryChannel, StoreChannel, Thread] + InteractionChannel = Union[ + VoiceChannel, StageChannel, TextChannel, CategoryChannel, StoreChannel, Thread, PartialMessageable + ] MISSING: Any = utils.MISSING @@ -92,6 +95,8 @@ class Interaction: token: :class:`str` The token to continue the interaction. These are valid for 15 minutes. + data: :class:`dict` + The raw interaction data. """ __slots__: Tuple[str, ...] = ( @@ -111,6 +116,7 @@ class Interaction: '_original_message', '_cs_response', '_cs_followup', + '_cs_channel', ) def __init__(self, *, data: InteractionPayload, state: ConnectionState): @@ -129,10 +135,9 @@ class Interaction: self.guild_id: Optional[int] = utils._get_as_snowflake(data, 'guild_id') self.application_id: int = int(data['application_id']) - channel = self.channel or Object(id=self.channel_id) # type: ignore self.message: Optional[Message] try: - self.message = Message(state=self._state, channel=channel, data=data['message']) # type: ignore + self.message = Message(state=self._state, channel=self.channel, data=data['message']) # type: ignore except KeyError: self.message = None @@ -160,15 +165,21 @@ class Interaction: """Optional[:class:`Guild`]: The guild the interaction was sent from.""" return self._state and self._state._get_guild(self.guild_id) - @property + @utils.cached_slot_property('_cs_channel') def channel(self) -> Optional[InteractionChannel]: - """Optional[Union[:class:`abc.GuildChannel`, :class:`Thread`]]: The channel the interaction was sent from. + """Optional[Union[:class:`abc.GuildChannel`, :class:`PartialMessageable`, :class:`Thread`]]: The channel the interaction was sent from. Note that due to a Discord limitation, DM channels are not resolved since there is - no data to complete them. + no data to complete them. These are :class:`PartialMessageable` instead. """ guild = self.guild - return guild and guild._resolve_channel(self.channel_id) + channel = guild and guild._resolve_channel(self.channel_id) + if channel is None: + if self.channel_id is not None: + type = ChannelType.text if self.guild_id is not None else ChannelType.private + return PartialMessageable(state=self._state, id=self.channel_id, type=type) + return None + return channel @property def permissions(self) -> Permissions: @@ -250,7 +261,7 @@ class Interaction: files: List[File] = MISSING, view: Optional[View] = MISSING, allowed_mentions: Optional[AllowedMentions] = None, - ): + ) -> InteractionMessage: """|coro| Edits the original interaction response message. @@ -291,7 +302,12 @@ class Interaction: TypeError You specified both ``embed`` and ``embeds`` or ``file`` and ``files`` ValueError - The length of ``embeds`` was invalid + The length of ``embeds`` was invalid. + + Returns + -------- + :class:`InteractionMessage` + The newly edited message. """ previous_mentions: Optional[AllowedMentions] = self._state.allowed_mentions @@ -315,8 +331,11 @@ class Interaction: files=params.files, ) + # The message channel types should always match + message = InteractionMessage(state=self._state, channel=self.channel, data=data) # type: ignore if view and not view.is_finished(): - self._state.store_view(view, int(data['id'])) + self._state.store_view(view, message.id) + return message async def delete_original_message(self) -> None: """|coro| @@ -626,6 +645,9 @@ class _InteractionMessageState: def store_user(self, data): return self._parent.store_user(data) + def create_user(self, data): + return self._parent.create_user(data) + @property def http(self): return self._parent.http @@ -658,7 +680,7 @@ class InteractionMessage(Message): files: List[File] = MISSING, view: Optional[View] = MISSING, allowed_mentions: Optional[AllowedMentions] = None, - ): + ) -> InteractionMessage: """|coro| Edits the message. @@ -693,9 +715,14 @@ class InteractionMessage(Message): TypeError You specified both ``embed`` and ``embeds`` or ``file`` and ``files`` ValueError - The length of ``embeds`` was invalid + The length of ``embeds`` was invalid. + + Returns + --------- + :class:`InteractionMessage` + The newly edited message. """ - await self._state._interaction.edit_original_message( + return await self._state._interaction.edit_original_message( content=content, embeds=embeds, embed=embed, diff --git a/discord/invite.py b/discord/invite.py index 7c0ac6b4..050d2b83 100644 --- a/discord/invite.py +++ b/discord/invite.py @@ -230,6 +230,7 @@ class Invite(Hashable): Returns the invite URL. + The following table illustrates what methods will obtain the attributes: +------------------------------------+------------------------------------------------------------+ @@ -257,7 +258,7 @@ class Invite(Hashable): Attributes ----------- max_age: :class:`int` - How long the before the invite expires in seconds. + How long before the invite expires in seconds. A value of ``0`` indicates that it doesn't expire. code: :class:`str` The URL fragment used for the invite. @@ -352,12 +353,12 @@ class Invite(Hashable): self.expires_at: Optional[datetime.datetime] = parse_time(expires_at) if expires_at else None inviter_data = data.get('inviter') - self.inviter: Optional[User] = None if inviter_data is None else self._state.store_user(inviter_data) + self.inviter: Optional[User] = None if inviter_data is None else self._state.create_user(inviter_data) self.channel: Optional[InviteChannelType] = self._resolve_channel(data.get('channel'), channel) target_user_data = data.get('target_user') - self.target_user: Optional[User] = None if target_user_data is None else self._state.store_user(target_user_data) + self.target_user: Optional[User] = None if target_user_data is None else self._state.create_user(target_user_data) self.target_type: InviteTarget = try_enum(InviteTarget, data.get("target_type", 0)) @@ -433,6 +434,9 @@ class Invite(Hashable): def __str__(self) -> str: return self.url + def __int__(self) -> int: + return 0 # To keep the object compatible with the hashable abc. + def __repr__(self) -> str: return ( f' str: return str(self._user) + def __int__(self) -> int: + return self.id + def __repr__(self) -> str: return ( f' Optional[Tuple[User, User]]: self.activities = tuple(map(create_activity, data['activities'])) @@ -493,6 +510,29 @@ class Member(discord.abc.Messageable, _UserTag): """ return self.nick or self.name + @property + def display_avatar(self) -> Asset: + """:class:`Asset`: Returns the member's display avatar. + + For regular members this is just their avatar, but + if they have a guild specific avatar then that + is returned instead. + + .. versionadded:: 2.0 + """ + return self.guild_avatar or self._user.avatar or self._user.default_avatar + + @property + def guild_avatar(self) -> Optional[Asset]: + """Optional[:class:`Asset`]: Returns an :class:`Asset` for the guild avatar + the member has. If unavailable, ``None`` is returned. + + .. versionadded:: 2.0 + """ + if self._avatar is None: + return None + return Asset._from_guild_avatar(self._state, self.guild.id, self.id, self._avatar) + @property def activity(self) -> Optional[ActivityTypes]: """Optional[Union[:class:`BaseActivity`, :class:`Spotify`]]: Returns the primary @@ -611,7 +651,7 @@ class Member(discord.abc.Messageable, _UserTag): roles: List[discord.abc.Snowflake] = MISSING, voice_channel: Optional[VocalGuildChannel] = MISSING, reason: Optional[str] = None, - ) -> None: + ) -> Optional[Member]: """|coro| Edits the member's data. @@ -637,6 +677,9 @@ class Member(discord.abc.Messageable, _UserTag): .. versionchanged:: 1.1 Can now pass ``None`` to ``voice_channel`` to kick a member from voice. + .. versionchanged:: 2.0 + The newly member is now optionally returned, if applicable. + Parameters ----------- nick: Optional[:class:`str`] @@ -664,6 +707,12 @@ class Member(discord.abc.Messageable, _UserTag): You do not have the proper permissions to the action requested. HTTPException The operation failed. + + Returns + -------- + Optional[:class:`.Member`] + The newly updated member, if applicable. This is only returned + when certain fields are updated. """ http = self._state.http guild_id = self.guild.id @@ -706,7 +755,8 @@ class Member(discord.abc.Messageable, _UserTag): payload['roles'] = tuple(r.id for r in roles) if payload: - await http.edit_member(guild_id, self.id, reason=reason, **payload) + data = await http.edit_member(guild_id, self.id, reason=reason, **payload) + return Member(data=data, guild=self.guild, state=self._state) async def request_to_speak(self) -> None: """|coro| @@ -847,7 +897,7 @@ class Member(discord.abc.Messageable, _UserTag): for role in roles: await req(guild_id, user_id, role.id, reason=reason) - def get_role(self, role_id: int) -> Optional[Role]: + def get_role(self, role_id: int, /) -> Optional[Role]: """Returns a role with the given ID from roles which the member has. .. versionadded:: 2.0 diff --git a/discord/message.py b/discord/message.py index ed2b2df9..49c5e718 100644 --- a/discord/message.py +++ b/discord/message.py @@ -29,7 +29,7 @@ import datetime import re import io from os import PathLike -from typing import Dict, TYPE_CHECKING, Union, List, Optional, Any, Callable, Tuple, ClassVar, Optional, overload +from typing import Dict, TYPE_CHECKING, Union, List, Optional, Any, Callable, Tuple, ClassVar, Optional, overload, TypeVar, Type from . import utils from .reaction import Reaction @@ -45,7 +45,7 @@ from .file import File from .utils import escape_mentions, MISSING from .guild import Guild from .mixins import Hashable -from .sticker import Sticker +from .sticker import StickerItem from .threads import Thread if TYPE_CHECKING: @@ -70,12 +70,13 @@ if TYPE_CHECKING: from .abc import GuildChannel, PartialMessageableChannel, MessageableChannel from .components import Component from .state import ConnectionState - from .channel import TextChannel, GroupChannel, DMChannel + from .channel import TextChannel, GroupChannel, DMChannel, PartialMessageable from .mentions import AllowedMentions from .user import User from .role import Role from .ui.view import View + MR = TypeVar('MR', bound='MessageReference') EmojiInputType = Union[Emoji, PartialEmoji, str] __all__ = ( @@ -124,6 +125,10 @@ class Attachment(Hashable): Returns the hash of the attachment. + .. describe:: int(x) + + Returns the attachment's ID. + .. versionchanged:: 1.7 Attachment can now be casted to :class:`str` and is hashable. @@ -341,7 +346,8 @@ class DeletedReferencedMessage: @property def id(self) -> int: """:class:`int`: The message ID of the deleted referenced message.""" - return self._parent.message_id + # the parent's message id won't be None here + return self._parent.message_id # type: ignore @property def channel_id(self) -> int: @@ -393,13 +399,13 @@ class MessageReference: def __init__(self, *, message_id: int, channel_id: int, guild_id: Optional[int] = None, fail_if_not_exists: bool = True): self._state: Optional[ConnectionState] = None self.resolved: Optional[Union[Message, DeletedReferencedMessage]] = None - self.message_id: int = message_id + self.message_id: Optional[int] = message_id self.channel_id: int = channel_id self.guild_id: Optional[int] = guild_id self.fail_if_not_exists: bool = fail_if_not_exists @classmethod - def with_state(cls, state: ConnectionState, data: MessageReferencePayload) -> MessageReference: + def with_state(cls: Type[MR], state: ConnectionState, data: MessageReferencePayload) -> MR: self = cls.__new__(cls) self.message_id = utils._get_as_snowflake(data, 'message_id') self.channel_id = int(data.pop('channel_id')) @@ -410,7 +416,7 @@ class MessageReference: return self @classmethod - def from_message(cls, message: Message, *, fail_if_not_exists: bool = True) -> MessageReference: + def from_message(cls: Type[MR], message: Message, *, fail_if_not_exists: bool = True) -> MR: """Creates a :class:`MessageReference` from an existing :class:`~discord.Message`. .. versionadded:: 1.6 @@ -457,13 +463,13 @@ class MessageReference: return f'' def to_dict(self) -> MessageReferencePayload: - result = {'message_id': self.message_id} if self.message_id is not None else {} + result: MessageReferencePayload = {'message_id': self.message_id} if self.message_id is not None else {} result['channel_id'] = self.channel_id if self.guild_id is not None: result['guild_id'] = self.guild_id if self.fail_if_not_exists is not None: result['fail_if_not_exists'] = self.fail_if_not_exists - return result # type: ignore + return result to_message_reference_dict = to_dict @@ -501,6 +507,14 @@ class Message(Hashable): Returns the message's hash. + .. describe:: str(x) + + Returns the message's content. + + .. describe:: int(x) + + Returns the message's ID. + Attributes ----------- tts: :class:`bool` @@ -520,7 +534,7 @@ class Message(Hashable): This is not stored long term within Discord's servers and is only used ephemerally. embeds: List[:class:`Embed`] A list of embeds the message has. - channel: Union[:class:`TextChannel`, :class:`Thread`, :class:`DMChannel`, :class:`GroupChannel`] + channel: Union[:class:`TextChannel`, :class:`Thread`, :class:`DMChannel`, :class:`GroupChannel`, :class:`PartialMessageable`] 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. reference: Optional[:class:`~discord.MessageReference`] @@ -588,8 +602,8 @@ class Message(Hashable): - ``description``: A string representing the application's description. - ``icon``: A string representing the icon ID of the application. - ``cover_image``: A string representing the embed's image asset ID. - stickers: List[:class:`Sticker`] - A list of stickers given to the message. + stickers: List[:class:`StickerItem`] + A list of sticker items given to the message. .. versionadded:: 1.6 components: List[:class:`Component`] @@ -637,7 +651,7 @@ class Message(Hashable): _HANDLERS: ClassVar[List[Tuple[str, Callable[..., None]]]] _CACHED_SLOTS: ClassVar[List[str]] guild: Optional[Guild] - ref: Optional[MessageReference] + reference: Optional[MessageReference] mentions: List[Union[User, Member]] author: Union[User, Member] role_mentions: List[Role] @@ -646,7 +660,7 @@ class Message(Hashable): self, *, state: ConnectionState, - channel: Union[TextChannel, Thread, DMChannel, GroupChannel], + channel: MessageableChannel, data: MessagePayload, ): self._state: ConnectionState = state @@ -666,10 +680,11 @@ class Message(Hashable): self.tts: bool = data['tts'] self.content: str = data['content'] self.nonce: Optional[Union[int, str]] = data.get('nonce') - self.stickers: List[Sticker] = [Sticker(data=d, state=state) for d in data.get('stickers', [])] + self.stickers: List[StickerItem] = [StickerItem(data=d, state=state) for d in data.get('sticker_items', [])] self.components: List[Component] = [_component_factory(d) for d in data.get('components', [])] try: + # if the channel doesn't have a guild attribute, we handle that self.guild = channel.guild # type: ignore except AttributeError: self.guild = state._get_guild(utils._get_as_snowflake(data, 'guild_id')) @@ -694,7 +709,8 @@ class Message(Hashable): else: chan, _ = state._get_guild_channel(resolved) - ref.resolved = self.__class__(channel=chan, data=resolved, state=state) + # the channel will be the correct type here + ref.resolved = self.__class__(channel=chan, data=resolved, state=state) # type: ignore for handler in ('author', 'member', 'mentions', 'mention_roles'): try: @@ -708,6 +724,10 @@ class Message(Hashable): f'<{name} id={self.id} channel={self.channel!r} type={self.type!r} author={self.author!r} flags={self.flags!r}>' ) + + def __str__(self) -> Optional[str]: + return self.content + def _try_patch(self, data, key, transform=None) -> None: try: value = data[key] @@ -977,9 +997,17 @@ class Message(Hashable): def is_system(self) -> bool: """:class:`bool`: Whether the message is a system message. + A system message is a message that is constructed entirely by the Discord API + in response to something. + .. versionadded:: 1.3 """ - return self.type is not MessageType.default + return self.type not in ( + MessageType.default, + MessageType.reply, + MessageType.application_command, + MessageType.thread_starter_message, + ) @utils.cached_slot_property('_cs_system_content') def system_content(self): @@ -994,21 +1022,27 @@ class Message(Hashable): if self.type is MessageType.default: return self.content - if self.type is MessageType.pins_add: - return f'{self.author.name} pinned a message to this channel.' - if self.type is MessageType.recipient_add: - return f'{self.author.name} added {self.mentions[0].name} to the group.' + if self.channel.type is ChannelType.group: + return f'{self.author.name} added {self.mentions[0].name} to the group.' + else: + return f'{self.author.name} added {self.mentions[0].name} to the thread.' if self.type is MessageType.recipient_remove: - return f'{self.author.name} removed {self.mentions[0].name} from the group.' + if self.channel.type is ChannelType.group: + return f'{self.author.name} removed {self.mentions[0].name} from the group.' + else: + return f'{self.author.name} removed {self.mentions[0].name} from the thread.' if self.type is MessageType.channel_name_change: - return f'{self.author.name} changed the channel name: {self.content}' + return f'{self.author.name} changed the channel name: **{self.content}**' if self.type is MessageType.channel_icon_change: return f'{self.author.name} changed the channel icon.' + if self.type is MessageType.pins_add: + return f'{self.author.name} pinned a message to this channel.' + if self.type is MessageType.new_member: formats = [ "{0} joined the party.", @@ -1030,21 +1064,34 @@ class Message(Hashable): return formats[created_at_ms % len(formats)].format(self.author.name) if self.type is MessageType.premium_guild_subscription: - return f'{self.author.name} just boosted the server!' + if not self.content: + return f'{self.author.name} just boosted the server!' + else: + return f'{self.author.name} just boosted the server **{self.content}** times!' if self.type is MessageType.premium_guild_tier_1: - return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 1!**' + if not self.content: + return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 1!**' + else: + return f'{self.author.name} just boosted the server **{self.content}** times! {self.guild} has achieved **Level 1!**' if self.type is MessageType.premium_guild_tier_2: - return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 2!**' + if not self.content: + return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 2!**' + else: + return f'{self.author.name} just boosted the server **{self.content}** times! {self.guild} has achieved **Level 2!**' if self.type is MessageType.premium_guild_tier_3: - return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 3!**' + if not self.content: + return f'{self.author.name} just boosted the server! {self.guild} has achieved **Level 3!**' + else: + return f'{self.author.name} just boosted the server **{self.content}** times! {self.guild} has achieved **Level 3!**' if self.type is MessageType.channel_follow_add: return f'{self.author.name} has added {self.content} to this channel' if self.type is MessageType.guild_stream: + # the author will be a Member return f'{self.author.name} is live! Now streaming {self.author.activity.name}' # type: ignore if self.type is MessageType.guild_discovery_disqualified: @@ -1059,13 +1106,23 @@ class Message(Hashable): if self.type is MessageType.guild_discovery_grace_period_final_warning: 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.' + if self.type is MessageType.thread_created: + return f'{self.author.name} started a thread: **{self.content}**. See all **threads**.' + if self.type is MessageType.reply: return self.content + if self.type is MessageType.thread_starter_message: + if self.reference is None or self.reference.resolved is None: + return 'Sorry, we couldn\'t load the first message in this thread' + + # the resolved message for the reference will be a Message + return self.reference.resolved.content # type: ignore + if self.type is MessageType.guild_invite_reminder: return 'Wondering who to invite?\nStart by inviting anyone who can help you build the server!' - async def delete(self, *, delay: Optional[float] = None) -> None: + async def delete(self, *, delay: Optional[float] = None, silent: bool = False) -> None: """|coro| Deletes the message. @@ -1076,12 +1133,17 @@ class Message(Hashable): .. versionchanged:: 1.1 Added the new ``delay`` keyword-only parameter. + .. versionchanged:: 2.0 + Added the new ``silent`` keyword-only parameter. Parameters ----------- delay: Optional[:class:`float`] If provided, the number of seconds to wait in the background before deleting the message. If the deletion fails then it is silently ignored. + silent: :class:`bool` + If silent is set to ``True``, the error will not be raised, it will be ignored. + This defaults to ``False`` Raises ------ @@ -1103,7 +1165,11 @@ class Message(Hashable): asyncio.create_task(delete(delay)) else: - await self._state.http.delete_message(self.channel.id, self.id) + try: + await self._state.http.delete_message(self.channel.id, self.id) + except Exception: + if not silent: + raise @overload async def edit( @@ -1116,7 +1182,7 @@ class Message(Hashable): delete_after: Optional[float] = ..., allowed_mentions: Optional[AllowedMentions] = ..., view: Optional[View] = ..., - ) -> None: + ) -> Message: ... @overload @@ -1130,7 +1196,7 @@ class Message(Hashable): delete_after: Optional[float] = ..., allowed_mentions: Optional[AllowedMentions] = ..., view: Optional[View] = ..., - ) -> None: + ) -> Message: ... async def edit( @@ -1143,7 +1209,7 @@ class Message(Hashable): delete_after: Optional[float] = None, allowed_mentions: Optional[AllowedMentions] = MISSING, view: Optional[View] = MISSING, - ) -> None: + ) -> Message: """|coro| Edits the message. @@ -1245,9 +1311,8 @@ class Message(Hashable): else: payload['components'] = [] - if payload: - data = await self._state.http.edit_message(self.channel.id, self.id, **payload) - self._update(data) + data = await self._state.http.edit_message(self.channel.id, self.id, **payload) + message = Message(state=self._state, channel=self.channel, data=data) if view and not view.is_finished(): self._state.store_view(view, self.id) @@ -1255,6 +1320,8 @@ class Message(Hashable): if delete_after is not None: await self.delete(delay=delete_after) + return message + async def publish(self) -> None: """|coro| @@ -1449,49 +1516,51 @@ class Message(Hashable): """ await self._state.http.clear_reactions(self.channel.id, self.id) - async def start_thread(self, *, name: str, auto_archive_duration: ThreadArchiveDuration = 1440) -> Thread: + async def create_thread(self, *, name: str, auto_archive_duration: ThreadArchiveDuration = MISSING) -> Thread: """|coro| - Starts a public thread from this message. + Creates a public thread from this message. - You must have :attr:`~discord.Permissions.send_messages` and - :attr:`~discord.Permissions.use_threads` in order to start a thread. + You must have :attr:`~discord.Permissions.create_public_threads` in order to + create a public thread from a message. The channel this message belongs in must be a :class:`TextChannel`. + .. versionadded:: 2.0 + Parameters ----------- name: :class:`str` The name of the thread. auto_archive_duration: :class:`int` The duration in minutes before a thread is automatically archived for inactivity. - Defaults to ``1440`` or 24 hours. + If not provided, the channel's default auto archive duration is used. Raises ------- Forbidden - You do not have permissions to start a thread. + You do not have permissions to create a thread. HTTPException - Starting the thread failed. + Creating the thread failed. InvalidArgument This message does not have guild info attached. Returns -------- :class:`.Thread` - The started thread. + The created thread. """ if self.guild is None: raise InvalidArgument('This message does not have guild info attached.') - data = await self._state.http.start_public_thread( + default_auto_archive_duration: ThreadArchiveDuration = getattr(self.channel, 'default_auto_archive_duration', 1440) + data = await self._state.http.start_thread_with_message( self.channel.id, self.id, name=name, - auto_archive_duration=auto_archive_duration, - type=ChannelType.public_thread.value, + auto_archive_duration=auto_archive_duration or default_auto_archive_duration, ) - return Thread(guild=self.guild, state=self._state, data=data) # type: ignore + return Thread(guild=self.guild, state=self._state, data=data) async def reply(self, content: Optional[str] = None, **kwargs) -> Message: """|coro| @@ -1581,6 +1650,10 @@ class PartialMessage(Hashable): Returns the partial message's hash. + .. describe:: int(x) + + Returns the partial message's ID. + Attributes ----------- channel: Union[:class:`TextChannel`, :class:`Thread`, :class:`DMChannel`] @@ -1605,8 +1678,15 @@ class PartialMessage(Hashable): to_message_reference_dict = Message.to_message_reference_dict def __init__(self, *, channel: PartialMessageableChannel, id: int): - if channel.type not in (ChannelType.text, ChannelType.news, ChannelType.private): - raise TypeError(f'Expected TextChannel or DMChannel not {type(channel)!r}') + if channel.type not in ( + ChannelType.text, + ChannelType.news, + ChannelType.private, + ChannelType.news_thread, + ChannelType.public_thread, + ChannelType.private_thread, + ): + raise TypeError(f'Expected TextChannel, DMChannel or Thread not {type(channel)!r}') self.channel: PartialMessageableChannel = channel self._state: ConnectionState = channel._state @@ -1730,7 +1810,7 @@ class PartialMessage(Hashable): fields['embed'] = embed.to_dict() try: - suppress = fields.pop('suppress') + suppress: bool = fields.pop('suppress') except KeyError: pass else: @@ -1768,9 +1848,10 @@ class PartialMessage(Hashable): data = await self._state.http.edit_message(self.channel.id, self.id, **fields) if delete_after is not None: - await self.delete(delay=delete_after) # type: ignore + await self.delete(delay=delete_after) if fields: + # data isn't unbound msg = self._state.create_message(channel=self.channel, data=data) # type: ignore if view and not view.is_finished(): self._state.store_view(view, self.id) diff --git a/discord/mixins.py b/discord/mixins.py index 3eca279f..fdacf863 100644 --- a/discord/mixins.py +++ b/discord/mixins.py @@ -22,24 +22,20 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -from typing import TypeVar - __all__ = ( 'EqualityComparable', 'Hashable', ) -E = TypeVar('E', bound='EqualityComparable') - class EqualityComparable: __slots__ = () id: int - def __eq__(self: E, other: E) -> bool: + def __eq__(self, other: object) -> bool: return isinstance(other, self.__class__) and other.id == self.id - def __ne__(self: E, other: E) -> bool: + def __ne__(self, other: object) -> bool: if isinstance(other, self.__class__): return other.id != self.id return True @@ -47,5 +43,8 @@ class EqualityComparable: class Hashable(EqualityComparable): __slots__ = () + def __int__(self) -> int: + return self.id + def __hash__(self) -> int: return self.id >> 22 diff --git a/discord/object.py b/discord/object.py index 3795425f..8061a8be 100644 --- a/discord/object.py +++ b/discord/object.py @@ -69,6 +69,10 @@ class Object(Hashable): Returns the object's hash. + .. describe:: int(x) + + Returns the object's ID. + Attributes ----------- id: :class:`int` diff --git a/discord/oggparse.py b/discord/oggparse.py index f2a14927..e0347d2c 100644 --- a/discord/oggparse.py +++ b/discord/oggparse.py @@ -22,8 +22,12 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + import struct +from typing import TYPE_CHECKING, ClassVar, IO, Generator, Tuple, Optional + from .errors import DiscordException __all__ = ( @@ -40,22 +44,29 @@ class OggError(DiscordException): # https://tools.ietf.org/html/rfc7845 class OggPage: - _header = struct.Struct(' None: try: header = stream.read(struct.calcsize(self._header.format)) self.flag, self.gran_pos, self.serial, \ self.pagenum, self.crc, self.segnum = self._header.unpack(header) - self.segtable = stream.read(self.segnum) + self.segtable: bytes = stream.read(self.segnum) bodylen = sum(struct.unpack('B'*self.segnum, self.segtable)) - self.data = stream.read(bodylen) + self.data: bytes = stream.read(bodylen) except Exception: raise OggError('bad data stream') from None - def iter_packets(self): + def iter_packets(self) -> Generator[Tuple[bytes, bool], None, None]: packetlen = offset = 0 partial = True @@ -74,10 +85,10 @@ class OggPage: yield self.data[offset:], False class OggStream: - def __init__(self, stream): - self.stream = stream + def __init__(self, stream: IO[bytes]) -> None: + self.stream: IO[bytes] = stream - def _next_page(self): + def _next_page(self) -> Optional[OggPage]: head = self.stream.read(4) if head == b'OggS': return OggPage(self.stream) @@ -86,13 +97,13 @@ class OggStream: else: raise OggError('invalid header magic') - def _iter_pages(self): + def _iter_pages(self) -> Generator[OggPage, None, None]: page = self._next_page() while page: yield page page = self._next_page() - def iter_packets(self): + def iter_packets(self) -> Generator[bytes, None, None]: partial = b'' for page in self._iter_pages(): for data, complete in page.iter_packets(): diff --git a/discord/opus.py b/discord/opus.py index 88127f99..97d437a3 100644 --- a/discord/opus.py +++ b/discord/opus.py @@ -22,6 +22,10 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + +from typing import List, Tuple, TypedDict, Any, TYPE_CHECKING, Callable, TypeVar, Literal, Optional, overload + import array import ctypes import ctypes.util @@ -31,7 +35,24 @@ import os.path import struct import sys -from .errors import DiscordException +from .errors import DiscordException, InvalidArgument + +if TYPE_CHECKING: + T = TypeVar('T') + BAND_CTL = Literal['narrow', 'medium', 'wide', 'superwide', 'full'] + SIGNAL_CTL = Literal['auto', 'voice', 'music'] + +class BandCtl(TypedDict): + narrow: int + medium: int + wide: int + superwide: int + full: int + +class SignalCtl(TypedDict): + auto: int + voice: int + music: int __all__ = ( 'Encoder', @@ -39,7 +60,7 @@ __all__ = ( 'OpusNotLoaded', ) -log = logging.getLogger(__name__) +_log = logging.getLogger(__name__) c_int_ptr = ctypes.POINTER(ctypes.c_int) c_int16_ptr = ctypes.POINTER(ctypes.c_int16) @@ -76,7 +97,7 @@ CTL_SET_SIGNAL = 4024 CTL_SET_GAIN = 4034 CTL_LAST_PACKET_DURATION = 4039 -band_ctl = { +band_ctl: BandCtl = { 'narrow': 1101, 'medium': 1102, 'wide': 1103, @@ -84,22 +105,22 @@ band_ctl = { 'full': 1105, } -signal_ctl = { +signal_ctl: SignalCtl = { 'auto': -1000, 'voice': 3001, 'music': 3002, } -def _err_lt(result, func, args): +def _err_lt(result: int, func: Callable, args: List) -> int: if result < OK: - log.info('error has happened in %s', func.__name__) + _log.info('error has happened in %s', func.__name__) raise OpusError(result) return result -def _err_ne(result, func, args): +def _err_ne(result: T, func: Callable, args: List) -> T: ret = args[-1]._obj if ret.value != OK: - log.info('error has happened in %s', func.__name__) + _log.info('error has happened in %s', func.__name__) raise OpusError(ret.value) return result @@ -108,7 +129,7 @@ def _err_ne(result, func, args): # The second one are the types of arguments it takes. # The third is the result type. # The fourth is the error handler. -exported_functions = [ +exported_functions: List[Tuple[Any, ...]] = [ # Generic ('opus_get_version_string', None, ctypes.c_char_p, None), @@ -158,7 +179,7 @@ exported_functions = [ [ctypes.c_char_p, ctypes.c_int], ctypes.c_int, _err_lt), ] -def libopus_loader(name): +def libopus_loader(name: str) -> Any: # create the library... lib = ctypes.cdll.LoadLibrary(name) @@ -178,11 +199,11 @@ def libopus_loader(name): if item[3]: func.errcheck = item[3] except KeyError: - log.exception("Error assigning check function to %s", func) + _log.exception("Error assigning check function to %s", func) return lib -def _load_default(): +def _load_default() -> bool: global _lib try: if sys.platform == 'win32': @@ -198,7 +219,7 @@ def _load_default(): return _lib is not None -def load_opus(name): +def load_opus(name: str) -> None: """Loads the libopus shared library for use with voice. If this function is not called then the library uses the function @@ -236,7 +257,7 @@ def load_opus(name): global _lib _lib = libopus_loader(name) -def is_loaded(): +def is_loaded() -> bool: """Function to check if opus lib is successfully loaded either via the :func:`ctypes.util.find_library` call of :func:`load_opus`. @@ -259,10 +280,10 @@ class OpusError(DiscordException): The error code returned. """ - def __init__(self, code): - self.code = code + def __init__(self, code: int): + self.code: int = code msg = _lib.opus_strerror(self.code).decode('utf-8') - log.info('"%s" has happened', msg) + _log.info('"%s" has happened', msg) super().__init__(msg) class OpusNotLoaded(DiscordException): @@ -286,92 +307,96 @@ class _OpusStruct: return _lib.opus_get_version_string().decode('utf-8') class Encoder(_OpusStruct): - def __init__(self, application=APPLICATION_AUDIO): + def __init__(self, application: int = APPLICATION_AUDIO): _OpusStruct.get_opus_version() - self.application = application - self._state = self._create_state() + self.application: int = application + self._state: EncoderStruct = self._create_state() self.set_bitrate(128) self.set_fec(True) self.set_expected_packet_loss_percent(0.15) self.set_bandwidth('full') self.set_signal_type('auto') - def __del__(self): + def __del__(self) -> None: if hasattr(self, '_state'): _lib.opus_encoder_destroy(self._state) - self._state = None + # This is a destructor, so it's okay to assign None + self._state = None # type: ignore - def _create_state(self): + def _create_state(self) -> EncoderStruct: ret = ctypes.c_int() return _lib.opus_encoder_create(self.SAMPLING_RATE, self.CHANNELS, self.application, ctypes.byref(ret)) - def set_bitrate(self, kbps): + def set_bitrate(self, kbps: int) -> int: kbps = min(512, max(16, int(kbps))) _lib.opus_encoder_ctl(self._state, CTL_SET_BITRATE, kbps * 1024) return kbps - def set_bandwidth(self, req): + def set_bandwidth(self, req: BAND_CTL) -> None: if req not in band_ctl: raise KeyError(f'{req!r} is not a valid bandwidth setting. Try one of: {",".join(band_ctl)}') k = band_ctl[req] _lib.opus_encoder_ctl(self._state, CTL_SET_BANDWIDTH, k) - def set_signal_type(self, req): + def set_signal_type(self, req: SIGNAL_CTL) -> None: if req not in signal_ctl: raise KeyError(f'{req!r} is not a valid bandwidth setting. Try one of: {",".join(signal_ctl)}') k = signal_ctl[req] _lib.opus_encoder_ctl(self._state, CTL_SET_SIGNAL, k) - def set_fec(self, enabled=True): + def set_fec(self, enabled: bool = True) -> None: _lib.opus_encoder_ctl(self._state, CTL_SET_FEC, 1 if enabled else 0) - def set_expected_packet_loss_percent(self, percentage): - _lib.opus_encoder_ctl(self._state, CTL_SET_PLP, min(100, max(0, int(percentage * 100)))) + def set_expected_packet_loss_percent(self, percentage: float) -> None: + _lib.opus_encoder_ctl(self._state, CTL_SET_PLP, min(100, max(0, int(percentage * 100)))) # type: ignore - def encode(self, pcm, frame_size): + def encode(self, pcm: bytes, frame_size: int) -> bytes: max_data_bytes = len(pcm) - pcm = ctypes.cast(pcm, c_int16_ptr) + # bytes can be used to reference pointer + pcm_ptr = ctypes.cast(pcm, c_int16_ptr) # type: ignore data = (ctypes.c_char * max_data_bytes)() - ret = _lib.opus_encode(self._state, pcm, frame_size, data, max_data_bytes) + ret = _lib.opus_encode(self._state, pcm_ptr, frame_size, data, max_data_bytes) - return array.array('b', data[:ret]).tobytes() + # array can be initialized with bytes but mypy doesn't know + return array.array('b', data[:ret]).tobytes() # type: ignore class Decoder(_OpusStruct): def __init__(self): _OpusStruct.get_opus_version() - self._state = self._create_state() + self._state: DecoderStruct = self._create_state() - def __del__(self): + def __del__(self) -> None: if hasattr(self, '_state'): _lib.opus_decoder_destroy(self._state) - self._state = None + # This is a destructor, so it's okay to assign None + self._state = None # type: ignore - def _create_state(self): + def _create_state(self) -> DecoderStruct: ret = ctypes.c_int() return _lib.opus_decoder_create(self.SAMPLING_RATE, self.CHANNELS, ctypes.byref(ret)) @staticmethod - def packet_get_nb_frames(data): + def packet_get_nb_frames(data: bytes) -> int: """Gets the number of frames in an Opus packet""" return _lib.opus_packet_get_nb_frames(data, len(data)) @staticmethod - def packet_get_nb_channels(data): + def packet_get_nb_channels(data: bytes) -> int: """Gets the number of channels in an Opus packet""" return _lib.opus_packet_get_nb_channels(data) @classmethod - def packet_get_samples_per_frame(cls, data): + def packet_get_samples_per_frame(cls, data: bytes) -> int: """Gets the number of samples per frame from an Opus packet""" return _lib.opus_packet_get_samples_per_frame(data, cls.SAMPLING_RATE) - def _set_gain(self, adjustment): + def _set_gain(self, adjustment: int) -> int: """Configures decoder gain adjustment. Scales the decoded output by a factor specified in Q8 dB units. @@ -383,26 +408,34 @@ class Decoder(_OpusStruct): """ return _lib.opus_decoder_ctl(self._state, CTL_SET_GAIN, adjustment) - def set_gain(self, dB): + def set_gain(self, dB: float) -> int: """Sets the decoder gain in dB, from -128 to 128.""" dB_Q8 = max(-32768, min(32767, round(dB * 256))) # dB * 2^n where n is 8 (Q8) return self._set_gain(dB_Q8) - def set_volume(self, mult): + def set_volume(self, mult: float) -> int: """Sets the output volume as a float percent, i.e. 0.5 for 50%, 1.75 for 175%, etc.""" return self.set_gain(20 * math.log10(mult)) # amplitude ratio - def _get_last_packet_duration(self): + def _get_last_packet_duration(self) -> int: """Gets the duration (in samples) of the last packet successfully decoded or concealed.""" ret = ctypes.c_int32() _lib.opus_decoder_ctl(self._state, CTL_LAST_PACKET_DURATION, ctypes.byref(ret)) return ret.value - def decode(self, data, *, fec=False): + @overload + def decode(self, data: bytes, *, fec: bool) -> bytes: + ... + + @overload + def decode(self, data: Literal[None], *, fec: Literal[False]) -> bytes: + ... + + def decode(self, data: Optional[bytes], *, fec: bool = False) -> bytes: if data is None and fec: - raise OpusError("Invalid arguments: FEC cannot be used with null data") + raise InvalidArgument("Invalid arguments: FEC cannot be used with null data") if data is None: frame_size = self._get_last_packet_duration() or self.SAMPLES_PER_FRAME diff --git a/discord/permissions.py b/discord/permissions.py index ab7ecbfe..9d40ca33 100644 --- a/discord/permissions.py +++ b/discord/permissions.py @@ -147,7 +147,7 @@ class Permissions(BaseFlags): """A factory method that creates a :class:`Permissions` with all permissions set to ``True``. """ - return cls(0b111111111111111111111111111111111111) + return cls(0b111111111111111111111111111111111111111) @classmethod def all_channel(cls: Type[P]) -> P: @@ -167,8 +167,13 @@ class Permissions(BaseFlags): .. versionchanged:: 1.7 Added :attr:`stream`, :attr:`priority_speaker` and :attr:`use_slash_commands` permissions. + + .. versionchanged:: 2.0 + 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. """ - return cls(0b10110011111101111111111101010001) + return cls(0b111110110110011111101111111111101010001) @classmethod def general(cls: Type[P]) -> P: @@ -200,8 +205,12 @@ class Permissions(BaseFlags): .. versionchanged:: 1.7 Permission :attr:`read_messages` is no longer part of the text permissions. Added :attr:`use_slash_commands` permission. + + .. versionchanged:: 2.0 + Added :attr:`create_public_threads`, :attr:`create_private_threads`, :attr:`manage_threads`, + :attr:`send_messages_in_threads` and :attr:`use_external_stickers` permissions. """ - return cls(0b10000000000001111111100001000000) + return cls(0b111110010000000000001111111100001000000) @classmethod def voice(cls: Type[P]) -> P: @@ -462,6 +471,14 @@ class Permissions(BaseFlags): """:class:`bool`: Returns ``True`` if a user can create, edit, or delete emojis.""" return 1 << 30 + @make_permission_alias('manage_emojis') + def manage_emojis_and_stickers(self) -> int: + """:class:`bool`: An alias for :attr:`manage_emojis`. + + .. versionadded:: 2.0 + """ + return 1 << 30 + @flag_value def use_slash_commands(self) -> int: """:class:`bool`: Returns ``True`` if a user can use slash commands. @@ -495,21 +512,45 @@ class Permissions(BaseFlags): return 1 << 34 @flag_value - def use_threads(self) -> int: - """:class:`bool`: Returns ``True`` if a user can create and participate in public threads. + def create_public_threads(self) -> int: + """:class:`bool`: Returns ``True`` if a user can create public threads. .. versionadded:: 2.0 """ return 1 << 35 @flag_value - def use_private_threads(self) -> int: - """:class:`bool`: Returns ``True`` if a user can create and participate in private threads. + def create_private_threads(self) -> int: + """:class:`bool`: Returns ``True`` if a user can create private threads. .. versionadded:: 2.0 """ return 1 << 36 + @flag_value + def external_stickers(self) -> int: + """:class:`bool`: Returns ``True`` if a user can use stickers from other guilds. + + .. versionadded:: 2.0 + """ + return 1 << 37 + + @make_permission_alias('external_stickers') + def use_external_stickers(self) -> int: + """:class:`bool`: An alias for :attr:`external_stickers`. + + .. versionadded:: 2.0 + """ + return 1 << 37 + + @flag_value + def send_messages_in_threads(self) -> int: + """:class:`bool`: Returns ``True`` if a user can send messages in threads. + + .. versionadded:: 2.0 + """ + return 1 << 38 + PO = TypeVar('PO', bound='PermissionOverwrite') def _augment_from_permissions(cls): @@ -613,12 +654,16 @@ class PermissionOverwrite: manage_permissions: Optional[bool] manage_webhooks: Optional[bool] manage_emojis: Optional[bool] + manage_emojis_and_stickers: Optional[bool] use_slash_commands: Optional[bool] request_to_speak: Optional[bool] manage_events: Optional[bool] manage_threads: Optional[bool] - use_threads: Optional[bool] - use_private_threads: Optional[bool] + create_public_threads: Optional[bool] + create_private_threads: Optional[bool] + send_messages_in_threads: Optional[bool] + external_stickers: Optional[bool] + use_external_stickers: Optional[bool] def __init__(self, **kwargs: Optional[bool]): self._values: Dict[str, Optional[bool]] = {} @@ -641,7 +686,7 @@ class PermissionOverwrite: else: self._values[key] = value - def pair(self): + def pair(self) -> Tuple[Permissions, Permissions]: """Tuple[:class:`Permissions`, :class:`Permissions`]: Returns the (allow, deny) pair from this overwrite.""" allow = Permissions.none() diff --git a/discord/player.py b/discord/player.py index 1e08faf2..8098d3e3 100644 --- a/discord/player.py +++ b/discord/player.py @@ -50,7 +50,7 @@ if TYPE_CHECKING: AT = TypeVar('AT', bound='AudioSource') FT = TypeVar('FT', bound='FFmpegOpusAudio') -log: logging.Logger = logging.getLogger(__name__) +_log = logging.getLogger(__name__) __all__ = ( 'AudioSource', @@ -140,13 +140,25 @@ class FFmpegAudio(AudioSource): .. versionadded:: 1.3 """ - def __init__(self, source: str, *, executable: str = 'ffmpeg', args: Any, **subprocess_kwargs: Any): + def __init__(self, source: Union[str, io.BufferedIOBase], *, executable: str = 'ffmpeg', args: Any, **subprocess_kwargs: Any): + piping = subprocess_kwargs.get('stdin') == subprocess.PIPE + if piping and isinstance(source, str): + raise TypeError("parameter conflict: 'source' parameter cannot be a string when piping to stdin") + args = [executable, *args] kwargs = {'stdout': subprocess.PIPE} kwargs.update(subprocess_kwargs) self._process: subprocess.Popen = self._spawn_process(args, **kwargs) self._stdout: IO[bytes] = self._process.stdout # type: ignore + self._stdin: Optional[IO[Bytes]] = None + self._pipe_thread: Optional[threading.Thread] = None + + if piping: + n = f'popen-stdin-writer:{id(self):#x}' + self._stdin = self._process.stdin + self._pipe_thread = threading.Thread(target=self._pipe_writer, args=(source,), daemon=True, name=n) + self._pipe_thread.start() def _spawn_process(self, args: Any, **subprocess_kwargs: Any) -> subprocess.Popen: process = None @@ -160,26 +172,44 @@ class FFmpegAudio(AudioSource): else: return process - def cleanup(self) -> None: + def _kill_process(self) -> None: proc = self._process if proc is MISSING: return - log.info('Preparing to terminate ffmpeg process %s.', proc.pid) + _log.info('Preparing to terminate ffmpeg process %s.', proc.pid) try: proc.kill() except Exception: - log.exception("Ignoring error attempting to kill ffmpeg process %s", proc.pid) + _log.exception('Ignoring error attempting to kill ffmpeg process %s', proc.pid) if proc.poll() is None: - log.info('ffmpeg process %s has not terminated. Waiting to terminate...', proc.pid) + _log.info('ffmpeg process %s has not terminated. Waiting to terminate...', proc.pid) proc.communicate() - log.info('ffmpeg process %s should have terminated with a return code of %s.', proc.pid, proc.returncode) + _log.info('ffmpeg process %s should have terminated with a return code of %s.', proc.pid, proc.returncode) else: - log.info('ffmpeg process %s successfully terminated with return code of %s.', proc.pid, proc.returncode) + _log.info('ffmpeg process %s successfully terminated with return code of %s.', proc.pid, proc.returncode) - self._process = self._stdout = MISSING + + def _pipe_writer(self, source: io.BufferedIOBase) -> None: + while self._process: + # arbitrarily large read size + data = source.read(8192) + if not data: + self._process.terminate() + return + try: + self._stdin.write(data) + except Exception: + _log.debug('Write error for %s, this is probably not a problem', self, exc_info=True) + # at this point the source data is either exhausted or the process is fubar + self._process.terminate() + return + + def cleanup(self) -> None: + self._kill_process() + self._process = self._stdout = self._stdin = MISSING class FFmpegPCMAudio(FFmpegAudio): """An audio source from FFmpeg (or AVConv). @@ -218,16 +248,16 @@ class FFmpegPCMAudio(FFmpegAudio): def __init__( self, - source: str, + source: Union[str, io.BufferedIOBase], *, executable: str = 'ffmpeg', pipe: bool = False, stderr: Optional[IO[str]] = None, - before_options: Optional[str] = None, + before_options: Optional[str] = None, options: Optional[str] = None ) -> None: args = [] - subprocess_kwargs = {'stdin': source if pipe else subprocess.DEVNULL, 'stderr': stderr} + subprocess_kwargs = {'stdin': subprocess.PIPE if pipe else subprocess.DEVNULL, 'stderr': stderr} if isinstance(before_options, str): args.extend(shlex.split(before_options)) @@ -315,7 +345,7 @@ class FFmpegOpusAudio(FFmpegAudio): def __init__( self, - source: str, + source: Union[str, io.BufferedIOBase], *, bitrate: int = 128, codec: Optional[str] = None, @@ -327,7 +357,7 @@ class FFmpegOpusAudio(FFmpegAudio): ) -> None: args = [] - subprocess_kwargs = {'stdin': source if pipe else subprocess.DEVNULL, 'stderr': stderr} + subprocess_kwargs = {'stdin': subprocess.PIPE if pipe else subprocess.DEVNULL, 'stderr': stderr} if isinstance(before_options, str): args.extend(shlex.split(before_options)) @@ -384,7 +414,6 @@ class FFmpegOpusAudio(FFmpegAudio): def custom_probe(source, executable): # some analysis code here - return codec, bitrate source = await discord.FFmpegOpusAudio.from_probe("song.webm", method=custom_probe) @@ -480,18 +509,18 @@ class FFmpegOpusAudio(FFmpegAudio): codec, bitrate = await loop.run_in_executor(None, lambda: probefunc(source, executable)) # type: ignore except Exception: if not fallback: - log.exception("Probe '%s' using '%s' failed", method, executable) + _log.exception("Probe '%s' using '%s' failed", method, executable) return # type: ignore - log.exception("Probe '%s' using '%s' failed, trying fallback", method, executable) + _log.exception("Probe '%s' using '%s' failed, trying fallback", method, executable) try: codec, bitrate = await loop.run_in_executor(None, lambda: fallback(source, executable)) # type: ignore except Exception: - log.exception("Fallback probe using '%s' failed", executable) + _log.exception("Fallback probe using '%s' failed", executable) else: - log.info("Fallback probe found codec=%s, bitrate=%s", codec, bitrate) + _log.info("Fallback probe found codec=%s, bitrate=%s", codec, bitrate) else: - log.info("Probe found codec=%s, bitrate=%s", codec, bitrate) + _log.info("Probe found codec=%s, bitrate=%s", codec, bitrate) finally: return codec, bitrate @@ -656,12 +685,12 @@ class AudioPlayer(threading.Thread): try: self.after(error) except Exception as exc: - log.exception('Calling the after function failed.') + _log.exception('Calling the after function failed.') exc.__context__ = error traceback.print_exception(type(exc), exc, exc.__traceback__) elif error: msg = f'Exception in voice thread {self.name}' - log.exception(msg, exc_info=error) + _log.exception(msg, exc_info=error) print(msg, file=sys.stderr) traceback.print_exception(type(error), error, error.__traceback__) @@ -698,4 +727,4 @@ class AudioPlayer(threading.Thread): try: asyncio.run_coroutine_threadsafe(self.client.ws.speak(speaking), self.client.loop) except Exception as e: - log.info("Speaking call in player failed: %s", e) + _log.info("Speaking call in player failed: %s", e) diff --git a/discord/py.typed b/discord/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/discord/raw_models.py b/discord/raw_models.py index f6937208..702058fc 100644 --- a/discord/raw_models.py +++ b/discord/raw_models.py @@ -22,6 +22,25 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + +from typing import TYPE_CHECKING, Optional, Set, List + +if TYPE_CHECKING: + from .types.raw_models import ( + MessageDeleteEvent, + BulkMessageDeleteEvent, + ReactionActionEvent, + MessageUpdateEvent, + ReactionClearEvent, + ReactionClearEmojiEvent, + IntegrationDeleteEvent + ) + from .message import Message + from .partial_emoji import PartialEmoji + from .member import Member + + from .enums import ChannelType, try_enum __all__ = ( @@ -35,11 +54,13 @@ __all__ = ( 'RawThreadDeleteEvent', ) + class _RawReprMixin: - def __repr__(self): + def __repr__(self) -> str: value = ' '.join(f'{attr}={getattr(self, attr)!r}' for attr in self.__slots__) return f'<{self.__class__.__name__} {value}>' + class RawMessageDeleteEvent(_RawReprMixin): """Represents the event payload for a :func:`on_raw_message_delete` event. @@ -57,14 +78,15 @@ class RawMessageDeleteEvent(_RawReprMixin): __slots__ = ('message_id', 'channel_id', 'guild_id', 'cached_message') - def __init__(self, data): - self.message_id = int(data['id']) - self.channel_id = int(data['channel_id']) - self.cached_message = None + def __init__(self, data: MessageDeleteEvent) -> None: + self.message_id: int = int(data['id']) + self.channel_id: int = int(data['channel_id']) + self.cached_message: Optional[Message] = None try: - self.guild_id = int(data['guild_id']) + self.guild_id: Optional[int] = int(data['guild_id']) except KeyError: - self.guild_id = None + self.guild_id: Optional[int] = None + class RawBulkMessageDeleteEvent(_RawReprMixin): """Represents the event payload for a :func:`on_raw_bulk_message_delete` event. @@ -83,15 +105,16 @@ class RawBulkMessageDeleteEvent(_RawReprMixin): __slots__ = ('message_ids', 'channel_id', 'guild_id', 'cached_messages') - def __init__(self, data): - self.message_ids = {int(x) for x in data.get('ids', [])} - self.channel_id = int(data['channel_id']) - self.cached_messages = [] + def __init__(self, data: BulkMessageDeleteEvent) -> None: + self.message_ids: Set[int] = {int(x) for x in data.get('ids', [])} + self.channel_id: int = int(data['channel_id']) + self.cached_messages: List[Message] = [] try: - self.guild_id = int(data['guild_id']) + self.guild_id: Optional[int] = int(data['guild_id']) except KeyError: - self.guild_id = None + self.guild_id: Optional[int] = None + class RawMessageUpdateEvent(_RawReprMixin): """Represents the payload for a :func:`on_raw_message_edit` event. @@ -118,16 +141,17 @@ class RawMessageUpdateEvent(_RawReprMixin): __slots__ = ('message_id', 'channel_id', 'guild_id', 'data', 'cached_message') - def __init__(self, data): - self.message_id = int(data['id']) - self.channel_id = int(data['channel_id']) - self.data = data - self.cached_message = None + def __init__(self, data: MessageUpdateEvent) -> None: + self.message_id: int = int(data['id']) + self.channel_id: int = int(data['channel_id']) + self.data: MessageUpdateEvent = data + self.cached_message: Optional[Message] = None try: - self.guild_id = int(data['guild_id']) + self.guild_id: Optional[int] = int(data['guild_id']) except KeyError: - self.guild_id = None + self.guild_id: Optional[int] = None + class RawReactionActionEvent(_RawReprMixin): """Represents the payload for a :func:`on_raw_reaction_add` or @@ -161,18 +185,19 @@ class RawReactionActionEvent(_RawReprMixin): __slots__ = ('message_id', 'user_id', 'channel_id', 'guild_id', 'emoji', 'event_type', 'member') - def __init__(self, data, emoji, event_type): - self.message_id = int(data['message_id']) - self.channel_id = int(data['channel_id']) - self.user_id = int(data['user_id']) - self.emoji = emoji - self.event_type = event_type - self.member = None + def __init__(self, data: ReactionActionEvent, emoji: PartialEmoji, event_type: str) -> None: + self.message_id: int = int(data['message_id']) + self.channel_id: int = int(data['channel_id']) + self.user_id: int = int(data['user_id']) + self.emoji: PartialEmoji = emoji + self.event_type: str = event_type + self.member: Optional[Member] = None try: - self.guild_id = int(data['guild_id']) + self.guild_id: Optional[int] = int(data['guild_id']) except KeyError: - self.guild_id = None + self.guild_id: Optional[int] = None + class RawReactionClearEvent(_RawReprMixin): """Represents the payload for a :func:`on_raw_reaction_clear` event. @@ -189,14 +214,15 @@ class RawReactionClearEvent(_RawReprMixin): __slots__ = ('message_id', 'channel_id', 'guild_id') - def __init__(self, data): - self.message_id = int(data['message_id']) - self.channel_id = int(data['channel_id']) + def __init__(self, data: ReactionClearEvent) -> None: + self.message_id: int = int(data['message_id']) + self.channel_id: int = int(data['channel_id']) try: - self.guild_id = int(data['guild_id']) + self.guild_id: Optional[int] = int(data['guild_id']) except KeyError: - self.guild_id = None + self.guild_id: Optional[int] = None + class RawReactionClearEmojiEvent(_RawReprMixin): """Represents the payload for a :func:`on_raw_reaction_clear_emoji` event. @@ -217,15 +243,16 @@ class RawReactionClearEmojiEvent(_RawReprMixin): __slots__ = ('message_id', 'channel_id', 'guild_id', 'emoji') - def __init__(self, data, emoji): - self.emoji = emoji - self.message_id = int(data['message_id']) - self.channel_id = int(data['channel_id']) + def __init__(self, data: ReactionClearEmojiEvent, emoji: PartialEmoji) -> None: + self.emoji: PartialEmoji = emoji + self.message_id: int = int(data['message_id']) + self.channel_id: int = int(data['channel_id']) try: - self.guild_id = int(data['guild_id']) + self.guild_id: Optional[int] = int(data['guild_id']) except KeyError: - self.guild_id = None + self.guild_id: Optional[int] = None + class RawIntegrationDeleteEvent(_RawReprMixin): """Represents the payload for a :func:`on_raw_integration_delete` event. @@ -244,14 +271,14 @@ class RawIntegrationDeleteEvent(_RawReprMixin): __slots__ = ('integration_id', 'application_id', 'guild_id') - def __init__(self, data): - self.integration_id = int(data['id']) - self.guild_id = int(data['guild_id']) + def __init__(self, data: IntegrationDeleteEvent) -> None: + self.integration_id: int = int(data['id']) + self.guild_id: int = int(data['guild_id']) try: - self.application_id = int(data['application_id']) + self.application_id: Optional[int] = int(data['application_id']) except KeyError: - self.application_id = None + self.application_id: Optional[int] = None class RawThreadDeleteEvent(_RawReprMixin): """Represents the payload for a :func:`on_raw_thread_delete` event. diff --git a/discord/role.py b/discord/role.py index 4bf5ab49..b690cbe4 100644 --- a/discord/role.py +++ b/discord/role.py @@ -42,6 +42,7 @@ if TYPE_CHECKING: Role as RolePayload, RoleTags as RoleTagPayload, ) + from .types.guild import RolePositionUpdate from .guild import Guild from .member import Member from .state import ConnectionState @@ -140,6 +141,14 @@ class Role(Hashable): Returns the role's name. + .. describe:: str(x) + + Returns the role's ID. + + .. describe:: int(x) + + Returns the role's ID. + Attributes ---------- id: :class:`int` @@ -194,6 +203,9 @@ class Role(Hashable): def __str__(self) -> str: return self.name + def __int__(self) -> int: + return self.id + def __repr__(self) -> str: return f'' @@ -336,7 +348,7 @@ class Role(Hashable): else: roles.append(self.id) - payload = [{"id": z[0], "position": z[1]} for z in zip(roles, change_range)] + payload: List[RolePositionUpdate] = [{"id": z[0], "position": z[1]} for z in zip(roles, change_range)] await http.move_role_position(self.guild.id, payload, reason=reason) async def edit( @@ -350,7 +362,7 @@ class Role(Hashable): mentionable: bool = MISSING, position: int = MISSING, reason: Optional[str] = MISSING, - ) -> None: + ) -> Optional[Role]: """|coro| Edits the role. @@ -363,6 +375,9 @@ class Role(Hashable): .. versionchanged:: 1.4 Can now pass ``int`` to ``colour`` keyword-only parameter. + .. versionchanged:: 2.0 + Edits are no longer in-place, the newly edited role is returned instead. + Parameters ----------- name: :class:`str` @@ -390,11 +405,14 @@ class Role(Hashable): InvalidArgument An invalid position was given or the default role was asked to be moved. - """ + Returns + -------- + :class:`Role` + The newly edited role. + """ if position is not MISSING: await self._move(position, reason=reason) - self.position = position payload: Dict[str, Any] = {} if color is not MISSING: @@ -419,7 +437,7 @@ class Role(Hashable): payload['mentionable'] = mentionable data = await self._state.http.edit_role(self.guild.id, self.id, reason=reason, **payload) - self._update(data) + return Role(guild=self.guild, data=data, state=self._state) async def delete(self, *, reason: Optional[str] = None) -> None: """|coro| diff --git a/discord/shard.py b/discord/shard.py index 06e3f213..edbdebf4 100644 --- a/discord/shard.py +++ b/discord/shard.py @@ -22,8 +22,9 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + import asyncio -import itertools import logging import aiohttp @@ -34,22 +35,30 @@ from .backoff import ExponentialBackoff from .gateway import * from .errors import ( ClientException, - InvalidArgument, HTTPException, GatewayNotFound, ConnectionClosed, PrivilegedIntentsRequired, ) -from . import utils from .enums import Status +from typing import TYPE_CHECKING, Any, Callable, Tuple, Type, Optional, List, Dict, TypeVar + +if TYPE_CHECKING: + from .gateway import DiscordWebSocket + from .activity import BaseActivity + from .enums import Status + + EI = TypeVar('EI', bound='EventItem') + __all__ = ( 'AutoShardedClient', 'ShardInfo', ) -log = logging.getLogger(__name__) +_log = logging.getLogger(__name__) + class EventType: close = 0 @@ -59,39 +68,41 @@ class EventType: terminate = 4 clean_close = 5 + class EventItem: __slots__ = ('type', 'shard', 'error') - def __init__(self, etype, shard, error): - self.type = etype - self.shard = shard - self.error = error + def __init__(self, etype: int, shard: Optional['Shard'], error: Optional[Exception]) -> None: + self.type: int = etype + self.shard: Optional['Shard'] = shard + self.error: Optional[Exception] = error - def __lt__(self, other): + def __lt__(self: EI, other: EI) -> bool: if not isinstance(other, EventItem): return NotImplemented return self.type < other.type - def __eq__(self, other): + def __eq__(self: EI, other: EI) -> bool: if not isinstance(other, EventItem): return NotImplemented return self.type == other.type - def __hash__(self): + def __hash__(self) -> int: return hash(self.type) + class Shard: - def __init__(self, ws, client, queue_put): - self.ws = ws - self._client = client - self._dispatch = client.dispatch - self._queue_put = queue_put - self.loop = self._client.loop - self._disconnect = False + def __init__(self, ws: DiscordWebSocket, client: AutoShardedClient, queue_put: Callable[[EventItem], None]) -> None: + self.ws: DiscordWebSocket = ws + self._client: Client = client + self._dispatch: Callable[..., None] = client.dispatch + self._queue_put: Callable[[EventItem], None] = queue_put + self.loop: asyncio.AbstractEventLoop = self._client.loop + self._disconnect: bool = False self._reconnect = client._reconnect - self._backoff = ExponentialBackoff() - self._task = None - self._handled_exceptions = ( + self._backoff: ExponentialBackoff = ExponentialBackoff() + self._task: Optional[asyncio.Task] = None + self._handled_exceptions: Tuple[Type[Exception], ...] = ( OSError, HTTPException, GatewayNotFound, @@ -101,25 +112,26 @@ class Shard: ) @property - def id(self): - return self.ws.shard_id + def id(self) -> int: + # DiscordWebSocket.shard_id is set in the from_client classmethod + return self.ws.shard_id # type: ignore - def launch(self): + def launch(self) -> None: self._task = self.loop.create_task(self.worker()) - def _cancel_task(self): + def _cancel_task(self) -> None: if self._task is not None and not self._task.done(): self._task.cancel() - async def close(self): + async def close(self) -> None: self._cancel_task() await self.ws.close(code=1000) - async def disconnect(self): + async def disconnect(self) -> None: await self.close() self._dispatch('shard_disconnect', self.id) - async def _handle_disconnect(self, e): + async def _handle_disconnect(self, e: Exception) -> None: self._dispatch('disconnect') self._dispatch('shard_disconnect', self.id) if not self._reconnect: @@ -144,11 +156,11 @@ class Shard: return retry = self._backoff.delay() - log.error('Attempting a reconnect for shard ID %s in %.2fs', self.id, retry, exc_info=e) + _log.error('Attempting a reconnect for shard ID %s in %.2fs', self.id, retry, exc_info=e) await asyncio.sleep(retry) self._queue_put(EventItem(EventType.reconnect, self, e)) - async def worker(self): + async def worker(self) -> None: while not self._client.is_closed(): try: await self.ws.poll_event() @@ -165,14 +177,19 @@ class Shard: self._queue_put(EventItem(EventType.terminate, self, e)) break - async def reidentify(self, exc): + async def reidentify(self, exc: ReconnectWebSocket) -> None: self._cancel_task() self._dispatch('disconnect') self._dispatch('shard_disconnect', self.id) - log.info('Got a request to %s the websocket at Shard ID %s.', exc.op, self.id) + _log.info('Got a request to %s the websocket at Shard ID %s.', exc.op, self.id) try: - coro = DiscordWebSocket.from_client(self._client, resume=exc.resume, shard_id=self.id, - session=self.ws.session_id, sequence=self.ws.sequence) + coro = DiscordWebSocket.from_client( + self._client, + resume=exc.resume, + shard_id=self.id, + session=self.ws.session_id, + sequence=self.ws.sequence, + ) self.ws = await asyncio.wait_for(coro, timeout=60.0) except self._handled_exceptions as e: await self._handle_disconnect(e) @@ -183,7 +200,7 @@ class Shard: else: self.launch() - async def reconnect(self): + async def reconnect(self) -> None: self._cancel_task() try: coro = DiscordWebSocket.from_client(self._client, shard_id=self.id) @@ -197,6 +214,7 @@ class Shard: else: self.launch() + class ShardInfo: """A class that gives information and control over a specific shard. @@ -215,16 +233,16 @@ class ShardInfo: __slots__ = ('_parent', 'id', 'shard_count') - def __init__(self, parent, shard_count): - self._parent = parent - self.id = parent.id - self.shard_count = shard_count + def __init__(self, parent: Shard, shard_count: Optional[int]) -> None: + self._parent: Shard = parent + self.id: int = parent.id + self.shard_count: Optional[int] = shard_count - def is_closed(self): + def is_closed(self) -> bool: """:class:`bool`: Whether the shard connection is currently closed.""" return not self._parent.ws.open - async def disconnect(self): + async def disconnect(self) -> None: """|coro| Disconnects a shard. When this is called, the shard connection will no @@ -237,7 +255,7 @@ class ShardInfo: await self._parent.disconnect() - async def reconnect(self): + async def reconnect(self) -> None: """|coro| Disconnects and then connects the shard again. @@ -246,7 +264,7 @@ class ShardInfo: await self._parent.disconnect() await self._parent.reconnect() - async def connect(self): + async def connect(self) -> None: """|coro| Connects a shard. If the shard is already connected this does nothing. @@ -257,11 +275,11 @@ class ShardInfo: await self._parent.reconnect() @property - def latency(self): + def latency(self) -> float: """:class:`float`: Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds for this shard.""" return self._parent.ws.latency - def is_ws_ratelimited(self): + def is_ws_ratelimited(self) -> bool: """:class:`bool`: Whether the websocket is currently rate limited. This can be useful to know when deciding whether you should query members @@ -271,6 +289,7 @@ class ShardInfo: """ return self._parent.ws.is_ratelimited() + class AutoShardedClient(Client): """A client similar to :class:`Client` except it handles the complications of sharding for the user into a more manageable and transparent single @@ -297,9 +316,13 @@ class AutoShardedClient(Client): shard_ids: Optional[List[:class:`int`]] An optional list of shard_ids to launch the shards with. """ - def __init__(self, *args, loop=None, **kwargs): + + if TYPE_CHECKING: + _connection: AutoShardedConnectionState + + def __init__(self, *args: Any, loop: Optional[asyncio.AbstractEventLoop] = None, **kwargs: Any) -> None: kwargs.pop('shard_id', None) - self.shard_ids = kwargs.pop('shard_ids', None) + self.shard_ids: Optional[List[int]] = kwargs.pop('shard_ids', None) super().__init__(*args, loop=loop, **kwargs) if self.shard_ids is not None: @@ -315,18 +338,24 @@ class AutoShardedClient(Client): self._connection._get_client = lambda: self self.__queue = asyncio.PriorityQueue() - def _get_websocket(self, guild_id=None, *, shard_id=None): + def _get_websocket(self, guild_id: Optional[int] = None, *, shard_id: Optional[int] = None) -> DiscordWebSocket: if shard_id is None: - shard_id = (guild_id >> 22) % self.shard_count + # guild_id won't be None if shard_id is None and shard_count won't be None here + shard_id = (guild_id >> 22) % self.shard_count # type: ignore return self.__shards[shard_id].ws - def _get_state(self, **options): - return AutoShardedConnectionState(dispatch=self.dispatch, - handlers=self._handlers, - hooks=self._hooks, http=self.http, loop=self.loop, **options) + def _get_state(self, **options: Any) -> AutoShardedConnectionState: + return AutoShardedConnectionState( + dispatch=self.dispatch, + handlers=self._handlers, + hooks=self._hooks, + http=self.http, + loop=self.loop, + **options, + ) @property - def latency(self): + def latency(self) -> float: """:class:`float`: Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds. This operates similarly to :meth:`Client.latency` except it uses the average @@ -338,14 +367,14 @@ class AutoShardedClient(Client): return sum(latency for _, latency in self.latencies) / len(self.__shards) @property - def latencies(self): + def latencies(self) -> List[Tuple[int, float]]: """List[Tuple[:class:`int`, :class:`float`]]: A list of latencies between a HEARTBEAT and a HEARTBEAT_ACK in seconds. This returns a list of tuples with elements ``(shard_id, latency)``. """ return [(shard_id, shard.ws.latency) for shard_id, shard in self.__shards.items()] - def get_shard(self, shard_id): + def get_shard(self, shard_id: int) -> Optional[ShardInfo]: """Optional[:class:`ShardInfo`]: Gets the shard information at a given shard ID or ``None`` if not found.""" try: parent = self.__shards[shard_id] @@ -355,16 +384,16 @@ class AutoShardedClient(Client): return ShardInfo(parent, self.shard_count) @property - def shards(self): + def shards(self) -> Dict[int, ShardInfo]: """Mapping[int, :class:`ShardInfo`]: Returns a mapping of shard IDs to their respective info object.""" - return { shard_id: ShardInfo(parent, self.shard_count) for shard_id, parent in self.__shards.items() } + return {shard_id: ShardInfo(parent, self.shard_count) for shard_id, parent in self.__shards.items()} - async def launch_shard(self, gateway, shard_id, *, initial=False): + async def launch_shard(self, gateway: str, shard_id: int, *, initial: bool = False) -> None: try: coro = DiscordWebSocket.from_client(self, initial=initial, gateway=gateway, shard_id=shard_id) ws = await asyncio.wait_for(coro, timeout=180.0) except Exception: - log.exception('Failed to connect for shard_id: %s. Retrying...', shard_id) + _log.exception('Failed to connect for shard_id: %s. Retrying...', shard_id) await asyncio.sleep(5.0) return await self.launch_shard(gateway, shard_id) @@ -372,7 +401,7 @@ class AutoShardedClient(Client): self.__shards[shard_id] = ret = Shard(ws, self, self.__queue.put_nowait) ret.launch() - async def launch_shards(self): + async def launch_shards(self) -> None: if self.shard_count is None: self.shard_count, gateway = await self.http.get_bot_gateway() else: @@ -389,7 +418,7 @@ class AutoShardedClient(Client): self._connection.shards_launched.set() - async def connect(self, *, reconnect=True): + async def connect(self, *, reconnect: bool = True) -> None: self._reconnect = reconnect await self.launch_shards() @@ -413,7 +442,7 @@ class AutoShardedClient(Client): elif item.type == EventType.clean_close: return - async def close(self): + async def close(self) -> None: """|coro| Closes the connection to Discord. @@ -425,7 +454,7 @@ class AutoShardedClient(Client): for vc in self.voice_clients: try: - await vc.disconnect() + await vc.disconnect(force=True) except Exception: pass @@ -436,7 +465,13 @@ class AutoShardedClient(Client): await self.http.close() self.__queue.put_nowait(EventItem(EventType.clean_close, None, None)) - async def change_presence(self, *, activity=None, status=None, shard_id=None): + async def change_presence( + self, + *, + activity: Optional[BaseActivity] = None, + status: Optional[Status] = None, + shard_id: int = None, + ) -> None: """|coro| Changes the client's presence. @@ -468,23 +503,23 @@ class AutoShardedClient(Client): """ if status is None: - status = 'online' + status_value = 'online' status_enum = Status.online elif status is Status.offline: - status = 'invisible' + status_value = 'invisible' status_enum = Status.offline else: status_enum = status - status = str(status) + status_value = str(status) if shard_id is None: for shard in self.__shards.values(): - await shard.ws.change_presence(activity=activity, status=status) + await shard.ws.change_presence(activity=activity, status=status_value) guilds = self._connection.guilds else: shard = self.__shards[shard_id] - await shard.ws.change_presence(activity=activity, status=status) + await shard.ws.change_presence(activity=activity, status=status_value) guilds = [g for g in self._connection.guilds if g.shard_id == shard_id] activities = () if activity is None else (activity,) @@ -493,10 +528,11 @@ class AutoShardedClient(Client): if me is None: continue - me.activities = activities + # Member.activities is typehinted as Tuple[ActivityType, ...], we may be setting it as Tuple[BaseActivity, ...] + me.activities = activities # type: ignore me.status = status_enum - def is_ws_ratelimited(self): + def is_ws_ratelimited(self) -> bool: """:class:`bool`: Whether the websocket is currently rate limited. This can be useful to know when deciding whether you should query members diff --git a/discord/stage_instance.py b/discord/stage_instance.py index 338e5ddc..b538eec3 100644 --- a/discord/stage_instance.py +++ b/discord/stage_instance.py @@ -61,6 +61,10 @@ class StageInstance(Hashable): Returns the stage instance's hash. + .. describe:: int(x) + + Returns the stage instance's ID. + Attributes ----------- id: :class:`int` @@ -74,7 +78,7 @@ class StageInstance(Hashable): privacy_level: :class:`StagePrivacyLevel` The privacy level of the stage instance. discoverable_disabled: :class:`bool` - Whether the stage instance is discoverable. + Whether discoverability for the stage instance is disabled. """ __slots__ = ( @@ -97,21 +101,22 @@ class StageInstance(Hashable): self.id: int = int(data['id']) self.channel_id: int = int(data['channel_id']) self.topic: str = data['topic'] - self.privacy_level = try_enum(StagePrivacyLevel, data['privacy_level']) - self.discoverable_disabled = data['discoverable_disabled'] + self.privacy_level: StagePrivacyLevel = try_enum(StagePrivacyLevel, data['privacy_level']) + self.discoverable_disabled: bool = data.get('discoverable_disabled', False) def __repr__(self) -> str: return f'' @cached_slot_property('_cs_channel') def channel(self) -> Optional[StageChannel]: - """Optional[:class:`StageChannel`: The guild that stage instance is running in.""" - return self._state.get_channel(self.channel_id) + """Optional[:class:`StageChannel`]: The channel that stage instance is running in.""" + # the returned channel will always be a StageChannel or None + return self._state.get_channel(self.channel_id) # type: ignore def is_public(self) -> bool: return self.privacy_level is StagePrivacyLevel.public - async def edit(self, *, topic: str = MISSING, privacy_level: StagePrivacyLevel = MISSING) -> None: + async def edit(self, *, topic: str = MISSING, privacy_level: StagePrivacyLevel = MISSING, reason: Optional[str] = None) -> None: """|coro| Edits the stage instance. @@ -125,6 +130,8 @@ class StageInstance(Hashable): The stage instance's new topic. privacy_level: :class:`StagePrivacyLevel` The stage instance's new privacy level. + reason: :class:`str` + The reason the stage instance was edited. Shows up on the audit log. Raises ------ @@ -148,9 +155,9 @@ class StageInstance(Hashable): payload['privacy_level'] = privacy_level.value if payload: - await self._state.http.edit_stage_instance(self.channel_id, **payload) + await self._state.http.edit_stage_instance(self.channel_id, **payload, reason=reason) - async def delete(self) -> None: + async def delete(self, *, reason: Optional[str] = None) -> None: """|coro| Deletes the stage instance. @@ -158,6 +165,11 @@ class StageInstance(Hashable): You must have the :attr:`~Permissions.manage_channels` permission to use this. + Parameters + ----------- + reason: :class:`str` + The reason the stage instance was deleted. Shows up on the audit log. + Raises ------ Forbidden @@ -165,4 +177,4 @@ class StageInstance(Hashable): HTTPException Deleting the stage instance failed. """ - await self._state.http.delete_stage_instance(self.channel_id) + await self._state.http.delete_stage_instance(self.channel_id, reason=reason) diff --git a/discord/state.py b/discord/state.py index 85c0ba35..b2711f0c 100644 --- a/discord/state.py +++ b/discord/state.py @@ -22,15 +22,15 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ +from __future__ import annotations + import asyncio from collections import deque, OrderedDict import copy import datetime import itertools import logging -from typing import Dict, Optional -import weakref -import warnings +from typing import Dict, Optional, TYPE_CHECKING, Union, Callable, Any, List, TypeVar, Coroutine, Sequence, Tuple, Deque import inspect import os @@ -54,21 +54,51 @@ from .object import Object from .invite import Invite from .integrations import _integration_factory from .interactions import Interaction -from .ui.view import ViewStore +from .ui.view import ViewStore, View from .stage_instance import StageInstance from .threads import Thread, ThreadMember +from .sticker import GuildSticker + +if TYPE_CHECKING: + from .abc import PrivateChannel + from .message import MessageableChannel + from .guild import GuildChannel, VocalGuildChannel + from .http import HTTPClient + from .voice_client import VoiceProtocol + from .client import Client + from .gateway import DiscordWebSocket + + from .types.activity import Activity as ActivityPayload + from .types.channel import DMChannel as DMChannelPayload + from .types.user import User as UserPayload + from .types.emoji import Emoji as EmojiPayload + from .types.sticker import GuildSticker as GuildStickerPayload + from .types.guild import Guild as GuildPayload + from .types.message import Message as MessagePayload + + T = TypeVar('T') + CS = TypeVar('CS', bound='ConnectionState') + Channel = Union[GuildChannel, VocalGuildChannel, PrivateChannel, PartialMessageable] + class ChunkRequest: - def __init__(self, guild_id, loop, resolver, *, cache=True): - self.guild_id = guild_id - self.resolver = resolver - self.loop = loop - self.cache = cache - self.nonce = os.urandom(16).hex() - self.buffer = [] # List[Member] - self.waiters = [] + def __init__( + self, + guild_id: int, + loop: asyncio.AbstractEventLoop, + resolver: Callable[[int], Any], + *, + cache: bool = True, + ) -> None: + self.guild_id: int = guild_id + self.resolver: Callable[[int], Any] = resolver + self.loop: asyncio.AbstractEventLoop = loop + self.cache: bool = cache + self.nonce: str = os.urandom(16).hex() + self.buffer: List[Member] = [] + self.waiters: List[asyncio.Future[List[Member]]] = [] - def add_members(self, members): + def add_members(self, members: List[Member]) -> None: self.buffer.extend(members) if self.cache: guild = self.resolver(self.guild_id) @@ -80,7 +110,7 @@ class ChunkRequest: if existing is None or existing.joined_at is None: guild._add_member(member) - async def wait(self): + async def wait(self) -> List[Member]: future = self.loop.create_future() self.waiters.append(future) try: @@ -88,40 +118,58 @@ class ChunkRequest: finally: self.waiters.remove(future) - def get_future(self): + def get_future(self) -> asyncio.Future[List[Member]]: future = self.loop.create_future() self.waiters.append(future) return future - def done(self): + def done(self) -> None: for future in self.waiters: if not future.done(): future.set_result(self.buffer) -log = logging.getLogger(__name__) -async def logging_coroutine(coroutine, *, info): +_log = logging.getLogger(__name__) + + +async def logging_coroutine(coroutine: Coroutine[Any, Any, T], *, info: str) -> Optional[T]: try: await coroutine except Exception: - log.exception('Exception occurred during %s', info) + _log.exception('Exception occurred during %s', info) + class ConnectionState: - def __init__(self, *, dispatch, handlers, hooks, http, loop, **options): - self.loop = loop - self.http = http - self.max_messages = options.get('max_messages', 1000) + if TYPE_CHECKING: + _get_websocket: Callable[..., DiscordWebSocket] + _get_client: Callable[..., Client] + _parsers: Dict[str, Callable[[Dict[str, Any]], None]] + + def __init__( + self, + *, + dispatch: Callable, + handlers: Dict[str, Callable], + hooks: Dict[str, Callable], + http: HTTPClient, + intents: Intents, + loop: asyncio.AbstractEventLoop, + **options: Any, + ) -> None: + self.loop: asyncio.AbstractEventLoop = loop + self.http: HTTPClient = http + self.max_messages: Optional[int] = options.get('max_messages', 1000) if self.max_messages is not None and self.max_messages <= 0: self.max_messages = 1000 - self.dispatch = dispatch - self.handlers = handlers - self.hooks = hooks - self.shard_count = None - self._ready_task = None - self.application_id = utils._get_as_snowflake(options, 'application_id') - self.heartbeat_timeout = options.get('heartbeat_timeout', 60.0) - self.guild_ready_timeout = options.get('guild_ready_timeout', 2.0) + self.dispatch: Callable = dispatch + self.handlers: Dict[str, Callable] = handlers + self.hooks: Dict[str, Callable] = hooks + self.shard_count: Optional[int] = None + self._ready_task: Optional[asyncio.Task] = None + self.application_id: Optional[int] = utils._get_as_snowflake(options, 'application_id') + self.heartbeat_timeout: float = options.get('heartbeat_timeout', 60.0) + self.guild_ready_timeout: float = options.get('guild_ready_timeout', 2.0) if self.guild_ready_timeout < 0: raise ValueError('guild_ready_timeout cannot be negative') @@ -130,8 +178,8 @@ class ConnectionState: if allowed_mentions is not None and not isinstance(allowed_mentions, AllowedMentions): raise TypeError('allowed_mentions parameter must be AllowedMentions') - self.allowed_mentions = allowed_mentions - self._chunk_requests = {} # Dict[Union[int, str], ChunkRequest] + self.allowed_mentions: Optional[AllowedMentions] = allowed_mentions + self._chunk_requests: Dict[Union[int, str], ChunkRequest] = {} activity = options.get('activity', None) if activity: @@ -147,17 +195,13 @@ class ConnectionState: else: status = str(status) - intents = options.get('intents', None) - if intents is not None: - if not isinstance(intents, Intents): - raise TypeError(f'intents parameter must be Intent not {type(intents)!r}') - else: - intents = Intents.default() + if not isinstance(intents, Intents): + raise TypeError(f'intents parameter must be Intent not {type(intents)!r}') if not intents.guilds: - log.warning('Guilds intent seems to be disabled. This may cause state related issues.') + _log.warning('Guilds intent seems to be disabled. This may cause state related issues.') - self._chunk_guilds = options.get('chunk_guilds_at_startup', intents.members) + self._chunk_guilds: bool = options.get('chunk_guilds_at_startup', intents.members) # Ensure these two are set properly if not intents.members and self._chunk_guilds: @@ -172,14 +216,14 @@ class ConnectionState: cache_flags._verify_intents(intents) - self.member_cache_flags = cache_flags - self._activity = activity - self._status = status - self._intents = intents + self.member_cache_flags: MemberCacheFlags = cache_flags + self._activity: Optional[ActivityPayload] = activity + self._status: Optional[str] = status + self._intents: Intents = intents if not intents.members or cache_flags._empty: - self.store_user = self.store_user_no_intents - self.deref_user = self.deref_user_no_intents + self.store_user = self.create_user # type: ignore + self.deref_user = self.deref_user_no_intents # type: ignore self.parsers = parsers = {} for attr, func in inspect.getmembers(self): @@ -188,8 +232,8 @@ class ConnectionState: self.clear() - def clear(self): - self.user = None + def clear(self, *, views: bool = True) -> None: + self.user: Optional[ClientUser] = None # Originally, this code used WeakValueDictionary to maintain references to the # global user mapping. @@ -203,18 +247,24 @@ class ConnectionState: # using __del__. Testing this for memory leaks led to no discernable leaks, # though more testing will have to be done. self._users: Dict[int, User] = {} - self._emojis = {} - self._guilds = {} - self._view_store = ViewStore(self) - self._voice_clients = {} + self._emojis: Dict[int, Emoji] = {} + self._stickers: Dict[int, GuildSticker] = {} + self._guilds: Dict[int, Guild] = {} + if views: + self._view_store: ViewStore = ViewStore(self) + + self._voice_clients: Dict[int, VoiceProtocol] = {} # LRU of max size 128 - self._private_channels = OrderedDict() + self._private_channels: OrderedDict[int, PrivateChannel] = OrderedDict() # extra dict to look up private channels by user id - self._private_channels_by_user = {} - self._messages = self.max_messages and deque(maxlen=self.max_messages) + self._private_channels_by_user: Dict[int, DMChannel] = {} + if self.max_messages is not None: + self._messages: Optional[Deque[Message]] = deque(maxlen=self.max_messages) + else: + self._messages: Optional[Deque[Message]] = None - def process_chunk_requests(self, guild_id, nonce, members, complete): + def process_chunk_requests(self, guild_id: int, nonce: Optional[str], members: List[Member], complete: bool) -> None: removed = [] for key, request in self._chunk_requests.items(): if request.guild_id == guild_id and request.nonce == nonce: @@ -226,7 +276,7 @@ class ConnectionState: for key in removed: del self._chunk_requests[key] - def call_handlers(self, key, *args, **kwargs): + def call_handlers(self, key: str, *args: Any, **kwargs: Any) -> None: try: func = self.handlers[key] except KeyError: @@ -234,7 +284,7 @@ class ConnectionState: else: func(*args, **kwargs) - async def call_hooks(self, key, *args, **kwargs): + async def call_hooks(self, key: str, *args: Any, **kwargs: Any) -> None: try: coro = self.hooks[key] except KeyError: @@ -243,34 +293,35 @@ class ConnectionState: await coro(*args, **kwargs) @property - def self_id(self): + def self_id(self) -> Optional[int]: u = self.user return u.id if u else None @property - def intents(self): + def intents(self) -> Intents: ret = Intents.none() ret.value = self._intents.value return ret @property - def voice_clients(self): + def voice_clients(self) -> List[VoiceProtocol]: return list(self._voice_clients.values()) - def _get_voice_client(self, guild_id): - return self._voice_clients.get(guild_id) + def _get_voice_client(self, guild_id: Optional[int]) -> Optional[VoiceProtocol]: + # the keys of self._voice_clients are ints + return self._voice_clients.get(guild_id) # type: ignore - def _add_voice_client(self, guild_id, voice): + def _add_voice_client(self, guild_id: int, voice: VoiceProtocol) -> None: self._voice_clients[guild_id] = voice - def _remove_voice_client(self, guild_id): + def _remove_voice_client(self, guild_id: int) -> None: self._voice_clients.pop(guild_id, None) - def _update_references(self, ws): + def _update_references(self, ws: DiscordWebSocket) -> None: for vc in self.voice_clients: - vc.main_ws = ws + vc.main_ws = ws # type: ignore - def store_user(self, data): + def store_user(self, data: UserPayload) -> User: user_id = int(data['id']) try: return self._users[user_id] @@ -281,75 +332,97 @@ class ConnectionState: user._stored = True return user - def deref_user(self, user_id): + def deref_user(self, user_id: int) -> None: self._users.pop(user_id, None) - def store_user_no_intents(self, data): + def create_user(self, data: UserPayload) -> User: return User(state=self, data=data) - def deref_user_no_intents(self, user_id): + def deref_user_no_intents(self, user_id: int) -> None: return - def get_user(self, id): - return self._users.get(id) + def get_user(self, id: Optional[int]) -> Optional[User]: + # the keys of self._users are ints + return self._users.get(id) # type: ignore - def store_emoji(self, guild, data): - emoji_id = int(data['id']) + def store_emoji(self, guild: Guild, data: EmojiPayload) -> Emoji: + # the id will be present here + emoji_id = int(data['id']) # type: ignore self._emojis[emoji_id] = emoji = Emoji(guild=guild, state=self, data=data) return emoji - def store_view(self, view, message_id=None): + def store_sticker(self, guild: Guild, data: GuildStickerPayload) -> GuildSticker: + sticker_id = int(data['id']) + self._stickers[sticker_id] = sticker = GuildSticker(state=self, data=data) + return sticker + + def store_view(self, view: View, message_id: Optional[int] = None) -> None: self._view_store.add_view(view, message_id) - def prevent_view_updates_for(self, message_id): + def prevent_view_updates_for(self, message_id: int) -> Optional[View]: return self._view_store.remove_message_tracking(message_id) @property - def persistent_views(self): + def persistent_views(self) -> Sequence[View]: return self._view_store.persistent_views @property - def guilds(self): + def guilds(self) -> List[Guild]: return list(self._guilds.values()) - def _get_guild(self, guild_id): - return self._guilds.get(guild_id) + def _get_guild(self, guild_id: Optional[int]) -> Optional[Guild]: + # the keys of self._guilds are ints + return self._guilds.get(guild_id) # type: ignore - def _add_guild(self, guild): + def _add_guild(self, guild: Guild) -> None: self._guilds[guild.id] = guild - def _remove_guild(self, guild): + def _remove_guild(self, guild: Guild) -> None: self._guilds.pop(guild.id, None) for emoji in guild.emojis: self._emojis.pop(emoji.id, None) + for sticker in guild.stickers: + self._stickers.pop(sticker.id, None) + del guild @property - def emojis(self): + def emojis(self) -> List[Emoji]: return list(self._emojis.values()) - def get_emoji(self, emoji_id): - return self._emojis.get(emoji_id) + @property + def stickers(self) -> List[GuildSticker]: + return list(self._stickers.values()) + + def get_emoji(self, emoji_id: Optional[int]) -> Optional[Emoji]: + # the keys of self._emojis are ints + return self._emojis.get(emoji_id) # type: ignore + + def get_sticker(self, sticker_id: Optional[int]) -> Optional[GuildSticker]: + # the keys of self._stickers are ints + return self._stickers.get(sticker_id) # type: ignore @property - def private_channels(self): + def private_channels(self) -> List[PrivateChannel]: return list(self._private_channels.values()) - def _get_private_channel(self, channel_id): + def _get_private_channel(self, channel_id: Optional[int]) -> Optional[PrivateChannel]: try: - value = self._private_channels[channel_id] + # the keys of self._private_channels are ints + value = self._private_channels[channel_id] # type: ignore except KeyError: return None else: - self._private_channels.move_to_end(channel_id) + self._private_channels.move_to_end(channel_id) # type: ignore return value - def _get_private_channel_by_user(self, user_id): - return self._private_channels_by_user.get(user_id) + def _get_private_channel_by_user(self, user_id: Optional[int]) -> Optional[DMChannel]: + # the keys of self._private_channels are ints + return self._private_channels_by_user.get(user_id) # type: ignore - def _add_private_channel(self, channel): + def _add_private_channel(self, channel: PrivateChannel) -> None: channel_id = channel.id self._private_channels[channel_id] = channel @@ -361,29 +434,32 @@ class ConnectionState: if isinstance(channel, DMChannel) and channel.recipient: self._private_channels_by_user[channel.recipient.id] = channel - def add_dm_channel(self, data): - channel = DMChannel(me=self.user, state=self, data=data) + def add_dm_channel(self, data: DMChannelPayload) -> DMChannel: + # self.user is *always* cached when this is called + channel = DMChannel(me=self.user, state=self, data=data) # type: ignore self._add_private_channel(channel) return channel - def _remove_private_channel(self, channel): + def _remove_private_channel(self, channel: PrivateChannel) -> None: self._private_channels.pop(channel.id, None) if isinstance(channel, DMChannel): - self._private_channels_by_user.pop(channel.recipient.id, None) + recipient = channel.recipient + if recipient is not None: + self._private_channels_by_user.pop(recipient.id, None) - def _get_message(self, msg_id): + def _get_message(self, msg_id: Optional[int]) -> Optional[Message]: return utils.find(lambda m: m.id == msg_id, reversed(self._messages)) if self._messages else None - def _add_guild_from_data(self, guild): - guild = Guild(data=guild, state=self) + def _add_guild_from_data(self, data: GuildPayload) -> Guild: + guild = Guild(data=data, state=self) self._add_guild(guild) return guild - def _guild_needs_chunking(self, guild): + def _guild_needs_chunking(self, guild: Guild) -> bool: # If presences are enabled then we get back the old guild.large behaviour return self._chunk_guilds and not guild.chunked and not (self._intents.presences and not guild.large) - def _get_guild_channel(self, data): + def _get_guild_channel(self, data: MessagePayload) -> Tuple[Union[Channel, Thread], Optional[Guild]]: channel_id = int(data['channel_id']) try: guild = self._get_guild(int(data['guild_id'])) @@ -393,13 +469,15 @@ class ConnectionState: else: channel = guild and guild._resolve_channel(channel_id) - return channel or Object(id=channel_id), guild + return channel or PartialMessageable(state=self, id=channel_id), guild - async def chunker(self, guild_id, query='', limit=0, presences=False, *, nonce=None): - ws = self._get_websocket(guild_id) # This is ignored upstream + async def chunker( + self, guild_id: int, query: str = '', limit: int = 0, presences: bool = False, *, nonce: Optional[str] = None + ) -> None: + ws = self._get_websocket(guild_id) # This is ignored upstream await ws.request_chunks(guild_id, query=query, limit=limit, presences=presences, nonce=nonce) - async def query_members(self, guild, query, limit, user_ids, cache, presences): + async def query_members(self, guild: Guild, query: str, limit: int, user_ids: List[int], cache: bool, presences: bool): guild_id = guild.id ws = self._get_websocket(guild_id) if ws is None: @@ -410,13 +488,15 @@ class ConnectionState: try: # start the query operation - await ws.request_chunks(guild_id, query=query, limit=limit, user_ids=user_ids, presences=presences, nonce=request.nonce) + await ws.request_chunks( + guild_id, query=query, limit=limit, user_ids=user_ids, presences=presences, nonce=request.nonce + ) return await asyncio.wait_for(request.wait(), timeout=30.0) except asyncio.TimeoutError: - log.warning('Timed out waiting for chunks with query %r and limit %d for guild_id %d', query, limit, guild_id) + _log.warning('Timed out waiting for chunks with query %r and limit %d for guild_id %d', query, limit, guild_id) raise - async def _delay_ready(self): + async def _delay_ready(self) -> None: try: states = [] while True: @@ -440,7 +520,7 @@ class ConnectionState: try: await asyncio.wait_for(future, timeout=5.0) except asyncio.TimeoutError: - log.warning('Shard ID %s timed out waiting for chunks for guild_id %s.', guild.shard_id, guild.id) + _log.warning('Shard ID %s timed out waiting for chunks for guild_id %s.', guild.shard_id, guild.id) if guild.unavailable is False: self.dispatch('guild_available', guild) @@ -451,7 +531,7 @@ class ConnectionState: try: del self._ready_state except AttributeError: - pass # already been deleted somehow + pass # already been deleted somehow except asyncio.CancelledError: pass @@ -462,13 +542,13 @@ class ConnectionState: finally: self._ready_task = None - def parse_ready(self, data): + def parse_ready(self, data) -> None: if self._ready_task is not None: self._ready_task.cancel() self._ready_state = asyncio.Queue() - self.clear() - self.user = user = ClientUser(state=self, data=data['user']) + self.clear(views=False) + self.user = ClientUser(state=self, data=data['user']) self.store_user(data['user']) if self.application_id is None: @@ -478,7 +558,8 @@ class ConnectionState: pass else: self.application_id = utils._get_as_snowflake(application, 'id') - self.application_flags = ApplicationFlags._from_value(application['flags']) + # flags will always be present here + self.application_flags = ApplicationFlags._from_value(application['flags']) # type: ignore for guild_data in data['guilds']: self._add_guild_from_data(guild_data) @@ -486,19 +567,21 @@ class ConnectionState: self.dispatch('connect') self._ready_task = asyncio.create_task(self._delay_ready()) - def parse_resumed(self, data): + def parse_resumed(self, data) -> None: self.dispatch('resumed') - def parse_message_create(self, data): + def parse_message_create(self, data) -> None: channel, _ = self._get_guild_channel(data) - message = Message(channel=channel, data=data, state=self) + # channel would be the correct type here + message = Message(channel=channel, data=data, state=self) # type: ignore self.dispatch('message', message) if self._messages is not None: self._messages.append(message) + # we ensure that the channel is either a TextChannel or Thread if channel and channel.__class__ in (TextChannel, Thread): - channel.last_message_id = message.id + channel.last_message_id = message.id # type: ignore - def parse_message_delete(self, data): + def parse_message_delete(self, data) -> None: raw = RawMessageDeleteEvent(data) found = self._get_message(raw.message_id) raw.cached_message = found @@ -507,7 +590,7 @@ class ConnectionState: self.dispatch('message_delete', found) self._messages.remove(found) - def parse_message_delete_bulk(self, data): + def parse_message_delete_bulk(self, data) -> None: raw = RawBulkMessageDeleteEvent(data) if self._messages: found_messages = [message for message in self._messages if message.id in raw.message_ids] @@ -518,9 +601,10 @@ class ConnectionState: if found_messages: self.dispatch('bulk_message_delete', found_messages) for msg in found_messages: - self._messages.remove(msg) + # self._messages won't be None here + self._messages.remove(msg) # type: ignore - def parse_message_update(self, data): + def parse_message_update(self, data) -> None: raw = RawMessageUpdateEvent(data) message = self._get_message(raw.message_id) if message is not None: @@ -538,7 +622,7 @@ class ConnectionState: if 'components' in data and self._view_store.is_message_tracked(raw.message_id): self._view_store.update_from_message(raw.message_id, data['components']) - def parse_message_reaction_add(self, data): + def parse_message_reaction_add(self, data) -> None: emoji = data['emoji'] emoji_id = utils._get_as_snowflake(emoji, 'id') emoji = PartialEmoji.with_state(self, id=emoji_id, animated=emoji.get('animated', False), name=emoji['name']) @@ -547,7 +631,10 @@ class ConnectionState: member_data = data.get('member') if member_data: guild = self._get_guild(raw.guild_id) - raw.member = Member(data=member_data, guild=guild, state=self) + if guild is not None: + raw.member = Member(data=member_data, guild=guild, state=self) + else: + raw.member = None else: raw.member = None self.dispatch('raw_reaction_add', raw) @@ -562,7 +649,7 @@ class ConnectionState: if user: self.dispatch('reaction_add', reaction, user) - def parse_message_reaction_remove_all(self, data): + def parse_message_reaction_remove_all(self, data) -> None: raw = RawReactionClearEvent(data) self.dispatch('raw_reaction_clear', raw) @@ -572,7 +659,7 @@ class ConnectionState: message.reactions.clear() self.dispatch('reaction_clear', message, old_reactions) - def parse_message_reaction_remove(self, data): + def parse_message_reaction_remove(self, data) -> None: emoji = data['emoji'] emoji_id = utils._get_as_snowflake(emoji, 'id') emoji = PartialEmoji.with_state(self, id=emoji_id, name=emoji['name']) @@ -584,14 +671,14 @@ class ConnectionState: emoji = self._upgrade_partial_emoji(emoji) try: reaction = message._remove_reaction(data, emoji, raw.user_id) - except (AttributeError, ValueError): # eventual consistency lol + except (AttributeError, ValueError): # eventual consistency lol pass else: user = self._get_reaction_user(message.channel, raw.user_id) if user: self.dispatch('reaction_remove', reaction, user) - def parse_message_reaction_remove_emoji(self, data): + def parse_message_reaction_remove_emoji(self, data) -> None: emoji = data['emoji'] emoji_id = utils._get_as_snowflake(emoji, 'id') emoji = PartialEmoji.with_state(self, id=emoji_id, name=emoji['name']) @@ -602,13 +689,13 @@ class ConnectionState: if message is not None: try: reaction = message._clear_emoji(emoji) - except (AttributeError, ValueError): # eventual consistency lol + except (AttributeError, ValueError): # eventual consistency lol pass else: if reaction: self.dispatch('reaction_clear_emoji', reaction) - def parse_interaction_create(self, data): + def parse_interaction_create(self, data) -> None: interaction = Interaction(data=data, state=self) if data['type'] == 3: # interaction component custom_id = interaction.data['custom_id'] # type: ignore @@ -617,18 +704,19 @@ class ConnectionState: self.dispatch('interaction', interaction) - def parse_presence_update(self, data): + def parse_presence_update(self, data) -> None: guild_id = utils._get_as_snowflake(data, 'guild_id') + # guild_id won't be None here guild = self._get_guild(guild_id) if guild is None: - log.debug('PRESENCE_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id) + _log.debug('PRESENCE_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id) return user = data['user'] member_id = int(user['id']) member = guild.get_member(member_id) if member is None: - log.debug('PRESENCE_UPDATE referencing an unknown member ID: %s. Discarding', member_id) + _log.debug('PRESENCE_UPDATE referencing an unknown member ID: %s. Discarding', member_id) return old_member = Member._copy(member) @@ -638,21 +726,23 @@ class ConnectionState: self.dispatch('presence_update', old_member, member) - def parse_user_update(self, data): - self.user._update(data) - ref = self._users.get(self.user.id) + def parse_user_update(self, data) -> None: + # self.user is *always* cached when this is called + user: ClientUser = self.user # type: ignore + user._update(data) + ref = self._users.get(user.id) if ref: ref._update(data) - def parse_invite_create(self, data): + def parse_invite_create(self, data) -> None: invite = Invite.from_gateway(state=self, data=data) self.dispatch('invite_create', invite) - def parse_invite_delete(self, data): + def parse_invite_delete(self, data) -> None: invite = Invite.from_gateway(state=self, data=data) self.dispatch('invite_delete', invite) - def parse_channel_delete(self, data): + def parse_channel_delete(self, data) -> None: guild = self._get_guild(utils._get_as_snowflake(data, 'guild_id')) channel_id = int(data['id']) if guild is not None: @@ -661,13 +751,14 @@ class ConnectionState: guild._remove_channel(channel) self.dispatch('guild_channel_delete', channel) - def parse_channel_update(self, data): + def parse_channel_update(self, data) -> None: channel_type = try_enum(ChannelType, data.get('type')) channel_id = int(data['id']) if channel_type is ChannelType.group: channel = self._get_private_channel(channel_id) old_channel = copy.copy(channel) - channel._update_group(data) + # the channel is a GroupChannel + channel._update_group(data) # type: ignore self.dispatch('private_channel_update', old_channel, channel) return @@ -680,27 +771,28 @@ class ConnectionState: channel._update(guild, data) self.dispatch('guild_channel_update', old_channel, channel) else: - log.debug('CHANNEL_UPDATE referencing an unknown channel ID: %s. Discarding.', channel_id) + _log.debug('CHANNEL_UPDATE referencing an unknown channel ID: %s. Discarding.', channel_id) else: - log.debug('CHANNEL_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id) + _log.debug('CHANNEL_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id) - def parse_channel_create(self, data): + def parse_channel_create(self, data) -> None: factory, ch_type = _channel_factory(data['type']) if factory is None: - log.debug('CHANNEL_CREATE referencing an unknown channel type %s. Discarding.', data['type']) + _log.debug('CHANNEL_CREATE referencing an unknown channel type %s. Discarding.', data['type']) return guild_id = utils._get_as_snowflake(data, 'guild_id') guild = self._get_guild(guild_id) if guild is not None: - channel = factory(guild=guild, state=self, data=data) - guild._add_channel(channel) + # the factory can't be a DMChannel or GroupChannel here + channel = factory(guild=guild, state=self, data=data) # type: ignore + guild._add_channel(channel) # type: ignore self.dispatch('guild_channel_create', channel) else: - log.debug('CHANNEL_CREATE referencing an unknown guild ID: %s. Discarding.', guild_id) + _log.debug('CHANNEL_CREATE referencing an unknown guild ID: %s. Discarding.', guild_id) return - def parse_channel_pins_update(self, data): + def parse_channel_pins_update(self, data) -> None: channel_id = int(data['channel_id']) try: guild = self._get_guild(int(data['guild_id'])) @@ -711,7 +803,7 @@ class ConnectionState: channel = guild and guild._resolve_channel(channel_id) if channel is None: - log.debug('CHANNEL_PINS_UPDATE referencing an unknown channel ID: %s. Discarding.', channel_id) + _log.debug('CHANNEL_PINS_UPDATE referencing an unknown channel ID: %s. Discarding.', channel_id) return last_pin = utils.parse_time(data['last_pin_timestamp']) if data['last_pin_timestamp'] else None @@ -721,11 +813,11 @@ class ConnectionState: else: self.dispatch('guild_channel_pins_update', channel, last_pin) - def parse_thread_create(self, data): + def parse_thread_create(self, data) -> None: guild_id = int(data['guild_id']) guild: Optional[Guild] = self._get_guild(guild_id) if guild is None: - log.debug('THREAD_CREATE referencing an unknown guild ID: %s. Discarding', guild_id) + _log.debug('THREAD_CREATE referencing an unknown guild ID: %s. Discarding', guild_id) return thread = Thread(guild=guild, state=guild._state, data=data) @@ -734,11 +826,11 @@ class ConnectionState: if not has_thread: self.dispatch('thread_join', thread) - def parse_thread_update(self, data): + def parse_thread_update(self, data) -> None: guild_id = int(data['guild_id']) guild = self._get_guild(guild_id) if guild is None: - log.debug('THREAD_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id) + _log.debug('THREAD_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id) return thread_id = int(data['id']) @@ -752,11 +844,11 @@ class ConnectionState: guild._add_thread(thread) self.dispatch('thread_join', thread) - def parse_thread_delete(self, data): + def parse_thread_delete(self, data) -> None: guild_id = int(data['guild_id']) guild = self._get_guild(guild_id) if guild is None: - log.debug('THREAD_DELETE referencing an unknown guild ID: %s. Discarding', guild_id) + _log.debug('THREAD_DELETE referencing an unknown guild ID: %s. Discarding', guild_id) return raw = RawThreadDeleteEvent(data) @@ -764,14 +856,14 @@ class ConnectionState: self.dispatch('raw_thread_delete', raw) if thread is not None: - guild._remove_thread(thread) + guild._remove_thread(thread) # type: ignore self.dispatch('thread_delete', thread) - def parse_thread_list_sync(self, data): + def parse_thread_list_sync(self, data) -> None: guild_id = int(data['guild_id']) guild: Optional[Guild] = self._get_guild(guild_id) if guild is None: - log.debug('THREAD_LIST_SYNC referencing an unknown guild ID: %s. Discarding', guild_id) + _log.debug('THREAD_LIST_SYNC referencing an unknown guild ID: %s. Discarding', guild_id) return try: @@ -784,10 +876,7 @@ class ConnectionState: else: previous_threads = guild._filter_threads(channel_ids) - threads = { - d['id']: guild._store_thread(d) - for d in data.get('threads', []) - } + threads = {d['id']: guild._store_thread(d) for d in data.get('threads', [])} for member in data.get('members', []): try: @@ -806,37 +895,37 @@ class ConnectionState: for thread in previous_threads.values(): self.dispatch('thread_remove', thread) - def parse_thread_member_update(self, data): + def parse_thread_member_update(self, data) -> None: guild_id = int(data['guild_id']) guild: Optional[Guild] = self._get_guild(guild_id) if guild is None: - log.debug('THREAD_MEMBER_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id) + _log.debug('THREAD_MEMBER_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id) return thread_id = int(data['id']) thread: Optional[Thread] = guild.get_thread(thread_id) if thread is None: - log.debug('THREAD_MEMBER_UPDATE referencing an unknown thread ID: %s. Discarding', thread_id) + _log.debug('THREAD_MEMBER_UPDATE referencing an unknown thread ID: %s. Discarding', thread_id) return member = ThreadMember(thread, data) thread.me = member - def parse_thread_members_update(self, data): + def parse_thread_members_update(self, data) -> None: guild_id = int(data['guild_id']) guild: Optional[Guild] = self._get_guild(guild_id) if guild is None: - log.debug('THREAD_MEMBERS_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id) + _log.debug('THREAD_MEMBERS_UPDATE referencing an unknown guild ID: %s. Discarding', guild_id) return thread_id = int(data['id']) thread: Optional[Thread] = guild.get_thread(thread_id) if thread is None: - log.debug('THREAD_MEMBERS_UPDATE referencing an unknown thread ID: %s. Discarding', thread_id) + _log.debug('THREAD_MEMBERS_UPDATE referencing an unknown thread ID: %s. Discarding', thread_id) return added_members = [ThreadMember(thread, d) for d in data.get('added_members', [])] - removed_member_ids = data.get('removed_member_ids', []) + removed_member_ids = [int(x) for x in data.get('removed_member_ids', [])] self_id = self.self_id for member in added_members: if member.id != self_id: @@ -849,14 +938,15 @@ class ConnectionState: for member_id in removed_member_ids: if member_id != self_id: member = thread._pop_member(member_id) - self.dispatch('thread_member_leave', member) + if member is not None: + self.dispatch('thread_member_remove', member) else: self.dispatch('thread_remove', thread) - def parse_guild_member_add(self, data): + def parse_guild_member_add(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is None: - log.debug('GUILD_MEMBER_ADD referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_MEMBER_ADD referencing an unknown guild ID: %s. Discarding.', data['guild_id']) return member = Member(guild=guild, data=data, state=self) @@ -870,7 +960,7 @@ class ConnectionState: self.dispatch('member_join', member) - def parse_guild_member_remove(self, data): + def parse_guild_member_remove(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None: try: @@ -881,17 +971,17 @@ class ConnectionState: user_id = int(data['user']['id']) member = guild.get_member(user_id) if member is not None: - guild._remove_member(member) + guild._remove_member(member) # type: ignore self.dispatch('member_remove', member) else: - log.debug('GUILD_MEMBER_REMOVE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_MEMBER_REMOVE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) - def parse_guild_member_update(self, data): + def parse_guild_member_update(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) user = data['user'] user_id = int(user['id']) if guild is None: - log.debug('GUILD_MEMBER_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_MEMBER_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) return member = guild.get_member(user_id) @@ -913,20 +1003,34 @@ class ConnectionState: self.dispatch('user_update', user_update[0], user_update[1]) guild._add_member(member) - log.debug('GUILD_MEMBER_UPDATE referencing an unknown member ID: %s. Discarding.', user_id) + _log.debug('GUILD_MEMBER_UPDATE referencing an unknown member ID: %s. Discarding.', user_id) - def parse_guild_emojis_update(self, data): + def parse_guild_emojis_update(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is None: - log.debug('GUILD_EMOJIS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_EMOJIS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) return before_emojis = guild.emojis for emoji in before_emojis: self._emojis.pop(emoji.id, None) - guild.emojis = tuple(map(lambda d: self.store_emoji(guild, d), data['emojis'])) + # guild won't be None here + guild.emojis = tuple(map(lambda d: self.store_emoji(guild, d), data['emojis'])) # type: ignore self.dispatch('guild_emojis_update', guild, before_emojis, guild.emojis) + def parse_guild_stickers_update(self, data) -> None: + guild = self._get_guild(int(data['guild_id'])) + if guild is None: + _log.debug('GUILD_STICKERS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + return + + before_stickers = guild.stickers + for emoji in before_stickers: + self._stickers.pop(emoji.id, None) + # guild won't be None here + guild.stickers = tuple(map(lambda d: self.store_sticker(guild, d), data['stickers'])) # type: ignore + self.dispatch('guild_stickers_update', guild, before_stickers, guild.stickers) + def _get_create_guild(self, data): if data.get('unavailable') is False: # GUILD_CREATE with unavailable in the response @@ -958,14 +1062,14 @@ class ConnectionState: try: await asyncio.wait_for(self.chunk_guild(guild), timeout=60.0) except asyncio.TimeoutError: - log.info('Somehow timed out waiting for chunks.') + _log.info('Somehow timed out waiting for chunks.') if unavailable is False: self.dispatch('guild_available', guild) else: self.dispatch('guild_join', guild) - def parse_guild_create(self, data): + def parse_guild_create(self, data) -> None: unavailable = data.get('unavailable') if unavailable is True: # joined a guild with unavailable == True so.. @@ -993,19 +1097,19 @@ class ConnectionState: else: self.dispatch('guild_join', guild) - def parse_guild_update(self, data): + def parse_guild_update(self, data) -> None: guild = self._get_guild(int(data['id'])) if guild is not None: old_guild = copy.copy(guild) guild._from_data(data) self.dispatch('guild_update', old_guild, guild) else: - log.debug('GUILD_UPDATE referencing an unknown guild ID: %s. Discarding.', data['id']) + _log.debug('GUILD_UPDATE referencing an unknown guild ID: %s. Discarding.', data['id']) - def parse_guild_delete(self, data): + def parse_guild_delete(self, data) -> None: guild = self._get_guild(int(data['id'])) if guild is None: - log.debug('GUILD_DELETE referencing an unknown guild ID: %s. Discarding.', data['id']) + _log.debug('GUILD_DELETE referencing an unknown guild ID: %s. Discarding.', data['id']) return if data.get('unavailable', False): @@ -1017,12 +1121,14 @@ class ConnectionState: # do a cleanup of the messages cache if self._messages is not None: - self._messages = deque((msg for msg in self._messages if msg.guild != guild), maxlen=self.max_messages) + self._messages: Optional[Deque[Message]] = deque( + (msg for msg in self._messages if msg.guild != guild), maxlen=self.max_messages + ) self._remove_guild(guild) self.dispatch('guild_remove', guild) - def parse_guild_ban_add(self, data): + def parse_guild_ban_add(self, data) -> None: # we make the assumption that GUILD_BAN_ADD is done # before GUILD_MEMBER_REMOVE is called # hence we don't remove it from cache or do anything @@ -1038,16 +1144,16 @@ class ConnectionState: member = guild.get_member(user.id) or user self.dispatch('member_ban', guild, member) - def parse_guild_ban_remove(self, data): + def parse_guild_ban_remove(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None and 'user' in data: user = self.store_user(data['user']) self.dispatch('member_unban', guild, user) - def parse_guild_role_create(self, data): + def parse_guild_role_create(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is None: - log.debug('GUILD_ROLE_CREATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_ROLE_CREATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) return role_data = data['role'] @@ -1055,7 +1161,7 @@ class ConnectionState: guild._add_role(role) self.dispatch('guild_role_create', role) - def parse_guild_role_delete(self, data): + def parse_guild_role_delete(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None: role_id = int(data['role_id']) @@ -1066,9 +1172,9 @@ class ConnectionState: else: self.dispatch('guild_role_delete', role) else: - log.debug('GUILD_ROLE_DELETE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_ROLE_DELETE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) - def parse_guild_role_update(self, data): + def parse_guild_role_update(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None: role_data = data['role'] @@ -1079,15 +1185,16 @@ class ConnectionState: role._update(role_data) self.dispatch('guild_role_update', old_role, role) else: - log.debug('GUILD_ROLE_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_ROLE_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) - def parse_guild_members_chunk(self, data): + def parse_guild_members_chunk(self, data) -> None: guild_id = int(data['guild_id']) guild = self._get_guild(guild_id) presences = data.get('presences', []) - members = [Member(guild=guild, data=member, state=self) for member in data.get('members', [])] - log.debug('Processed a chunk for %s members in guild ID %s.', len(members), guild_id) + # the guild won't be None here + members = [Member(guild=guild, data=member, state=self) for member in data.get('members', [])] # type: ignore + _log.debug('Processed a chunk for %s members in guild ID %s.', len(members), guild_id) if presences: member_dict = {str(member.id): member for member in members} @@ -1095,19 +1202,20 @@ class ConnectionState: user = presence['user'] member_id = user['id'] member = member_dict.get(member_id) - member._presence_update(presence, user) + if member is not None: + member._presence_update(presence, user) complete = data.get('chunk_index', 0) + 1 == data.get('chunk_count') self.process_chunk_requests(guild_id, data.get('nonce'), members, complete) - def parse_guild_integrations_update(self, data): + def parse_guild_integrations_update(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None: self.dispatch('guild_integrations_update', guild) else: - log.debug('GUILD_INTEGRATIONS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('GUILD_INTEGRATIONS_UPDATE referencing an unknown guild ID: %s. Discarding.', data['guild_id']) - def parse_integration_create(self, data): + def parse_integration_create(self, data) -> None: guild_id = int(data.pop('guild_id')) guild = self._get_guild(guild_id) if guild is not None: @@ -1115,9 +1223,9 @@ class ConnectionState: integration = cls(data=data, guild=guild) self.dispatch('integration_create', integration) else: - log.debug('INTEGRATION_CREATE referencing an unknown guild ID: %s. Discarding.', guild_id) + _log.debug('INTEGRATION_CREATE referencing an unknown guild ID: %s. Discarding.', guild_id) - def parse_integration_update(self, data): + def parse_integration_update(self, data) -> None: guild_id = int(data.pop('guild_id')) guild = self._get_guild(guild_id) if guild is not None: @@ -1125,39 +1233,39 @@ class ConnectionState: integration = cls(data=data, guild=guild) self.dispatch('integration_update', integration) else: - log.debug('INTEGRATION_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id) + _log.debug('INTEGRATION_UPDATE referencing an unknown guild ID: %s. Discarding.', guild_id) - def parse_integration_delete(self, data): + def parse_integration_delete(self, data) -> None: guild_id = int(data['guild_id']) guild = self._get_guild(guild_id) if guild is not None: raw = RawIntegrationDeleteEvent(data) self.dispatch('raw_integration_delete', raw) else: - log.debug('INTEGRATION_DELETE referencing an unknown guild ID: %s. Discarding.', guild_id) + _log.debug('INTEGRATION_DELETE referencing an unknown guild ID: %s. Discarding.', guild_id) - def parse_webhooks_update(self, data): + def parse_webhooks_update(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is None: - log.debug('WEBHOOKS_UPDATE referencing an unknown guild ID: %s. Discarding', data['guild_id']) + _log.debug('WEBHOOKS_UPDATE referencing an unknown guild ID: %s. Discarding', data['guild_id']) return channel = guild.get_channel(int(data['channel_id'])) if channel is not None: self.dispatch('webhooks_update', channel) else: - log.debug('WEBHOOKS_UPDATE referencing an unknown channel ID: %s. Discarding.', data['channel_id']) + _log.debug('WEBHOOKS_UPDATE referencing an unknown channel ID: %s. Discarding.', data['channel_id']) - def parse_stage_instance_create(self, data): + def parse_stage_instance_create(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None: stage_instance = StageInstance(guild=guild, state=self, data=data) guild._stage_instances[stage_instance.id] = stage_instance self.dispatch('stage_instance_create', stage_instance) else: - log.debug('STAGE_INSTANCE_CREATE referencing unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('STAGE_INSTANCE_CREATE referencing unknown guild ID: %s. Discarding.', data['guild_id']) - def parse_stage_instance_update(self, data): + def parse_stage_instance_update(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None: stage_instance = guild._stage_instances.get(int(data['id'])) @@ -1166,11 +1274,11 @@ class ConnectionState: stage_instance._update(data) self.dispatch('stage_instance_update', old_stage_instance, stage_instance) else: - log.debug('STAGE_INSTANCE_UPDATE referencing unknown stage instance ID: %s. Discarding.', data['id']) + _log.debug('STAGE_INSTANCE_UPDATE referencing unknown stage instance ID: %s. Discarding.', data['id']) else: - log.debug('STAGE_INSTANCE_UPDATE referencing unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('STAGE_INSTANCE_UPDATE referencing unknown guild ID: %s. Discarding.', data['guild_id']) - def parse_stage_instance_delete(self, data): + def parse_stage_instance_delete(self, data) -> None: guild = self._get_guild(int(data['guild_id'])) if guild is not None: try: @@ -1180,13 +1288,14 @@ class ConnectionState: else: self.dispatch('stage_instance_delete', stage_instance) else: - log.debug('STAGE_INSTANCE_DELETE referencing unknown guild ID: %s. Discarding.', data['guild_id']) + _log.debug('STAGE_INSTANCE_DELETE referencing unknown guild ID: %s. Discarding.', data['guild_id']) - def parse_voice_state_update(self, data): + def parse_voice_state_update(self, data) -> None: guild = self._get_guild(utils._get_as_snowflake(data, 'guild_id')) channel_id = utils._get_as_snowflake(data, 'channel_id') flags = self.member_cache_flags - self_id = self.user.id + # self.user is *always* cached when this is called + self_id = self.user.id # type: ignore if guild is not None: if int(data['user_id']) == self_id: voice = self._get_voice_client(guild.id) @@ -1194,20 +1303,21 @@ class ConnectionState: coro = voice.on_voice_state_update(data) asyncio.create_task(logging_coroutine(coro, info='Voice Protocol voice state update handler')) - member, before, after = guild._update_voice_state(data, channel_id) + member, before, after = guild._update_voice_state(data, channel_id) # type: ignore if member is not None: if flags.voice: if channel_id is None and flags._voice_only and member.id != self_id: - # Only remove from cache iff we only have the voice flag enabled - guild._remove_member(member) + # Only remove from cache if we only have the voice flag enabled + # Member doesn't meet the Snowflake protocol currently + guild._remove_member(member) # type: ignore elif channel_id is not None: guild._add_member(member) self.dispatch('voice_state_update', member, before, after) else: - log.debug('VOICE_STATE_UPDATE referencing an unknown member ID: %s. Discarding.', data['user_id']) + _log.debug('VOICE_STATE_UPDATE referencing an unknown member ID: %s. Discarding.', data['user_id']) - def parse_voice_server_update(self, data): + def parse_voice_server_update(self, data) -> None: try: key_id = int(data['guild_id']) except KeyError: @@ -1218,15 +1328,18 @@ class ConnectionState: coro = vc.on_voice_server_update(data) asyncio.create_task(logging_coroutine(coro, info='Voice Protocol voice server update handler')) - def parse_typing_start(self, data): + def parse_typing_start(self, data) -> None: channel, guild = self._get_guild_channel(data) if channel is not None: member = None user_id = utils._get_as_snowflake(data, 'user_id') if isinstance(channel, DMChannel): member = channel.recipient - elif isinstance(channel, TextChannel) and guild is not None: - member = guild.get_member(user_id) + + elif isinstance(channel, (Thread, TextChannel)) and guild is not None: + # user_id won't be None + member = guild.get_member(user_id) # type: ignore + if member is None: member_data = data.get('member') if member_data: @@ -1239,12 +1352,12 @@ class ConnectionState: timestamp = datetime.datetime.fromtimestamp(data.get('timestamp'), tz=datetime.timezone.utc) self.dispatch('typing', channel, member, timestamp) - def _get_reaction_user(self, channel, user_id): + def _get_reaction_user(self, channel: MessageableChannel, user_id: int) -> Optional[Union[User, Member]]: if isinstance(channel, TextChannel): return channel.guild.get_member(user_id) return self.get_user(user_id) - def get_reaction_emoji(self, data): + def get_reaction_emoji(self, data) -> Union[Emoji, PartialEmoji]: emoji_id = utils._get_as_snowflake(data, 'id') if not emoji_id: @@ -1255,7 +1368,7 @@ class ConnectionState: except KeyError: return PartialEmoji.with_state(self, animated=data.get('animated', False), id=emoji_id, name=data['name']) - def _upgrade_partial_emoji(self, emoji): + def _upgrade_partial_emoji(self, emoji: PartialEmoji) -> Union[Emoji, PartialEmoji, str]: emoji_id = emoji.id if not emoji_id: return emoji.name @@ -1264,7 +1377,7 @@ class ConnectionState: except KeyError: return emoji - def get_channel(self, id): + def get_channel(self, id: Optional[int]) -> Optional[Union[Channel, Thread]]: if id is None: return None @@ -1277,18 +1390,21 @@ class ConnectionState: if channel is not None: return channel - def create_message(self, *, channel, data): + def create_message( + self, *, channel: Union[TextChannel, Thread, DMChannel, GroupChannel, PartialMessageable], data: MessagePayload + ) -> Message: return Message(state=self, channel=channel, data=data) -class AutoShardedConnectionState(ConnectionState): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self._ready_task = None - self.shard_ids = () - self.shards_launched = asyncio.Event() - def _update_message_references(self): - for msg in self._messages: +class AutoShardedConnectionState(ConnectionState): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.shard_ids: Union[List[int], range] = [] + self.shards_launched: asyncio.Event = asyncio.Event() + + def _update_message_references(self) -> None: + # self._messages won't be None when this is called + for msg in self._messages: # type: ignore if not msg.guild: continue @@ -1296,13 +1412,23 @@ class AutoShardedConnectionState(ConnectionState): if new_guild is not None and new_guild is not msg.guild: channel_id = msg.channel.id channel = new_guild._resolve_channel(channel_id) or Object(id=channel_id) - msg._rebind_cached_references(new_guild, channel) + # channel will either be a TextChannel, Thread or Object + msg._rebind_cached_references(new_guild, channel) # type: ignore - async def chunker(self, guild_id, query='', limit=0, presences=False, *, shard_id=None, nonce=None): + async def chunker( + self, + guild_id: int, + query: str = '', + limit: int = 0, + presences: bool = False, + *, + shard_id: Optional[int] = None, + nonce: Optional[str] = None, + ) -> None: ws = self._get_websocket(guild_id, shard_id=shard_id) await ws.request_chunks(guild_id, query=query, limit=limit, presences=presences, nonce=nonce) - async def _delay_ready(self): + async def _delay_ready(self) -> None: await self.shards_launched.wait() processed = [] max_concurrency = len(self.shard_ids) * 2 @@ -1316,13 +1442,13 @@ class AutoShardedConnectionState(ConnectionState): break else: if self._guild_needs_chunking(guild): - log.debug('Guild ID %d requires chunking, will be done in the background.', guild.id) + _log.debug('Guild ID %d requires chunking, will be done in the background.', guild.id) if len(current_bucket) >= max_concurrency: try: await utils.sane_wait_for(current_bucket, timeout=max_concurrency * 70.0) except asyncio.TimeoutError: fmt = 'Shard ID %s failed to wait for chunks from a sub-bucket with length %d' - log.warning(fmt, guild.shard_id, len(current_bucket)) + _log.warning(fmt, guild.shard_id, len(current_bucket)) finally: current_bucket = [] @@ -1343,9 +1469,9 @@ class AutoShardedConnectionState(ConnectionState): try: await utils.sane_wait_for(futures, timeout=timeout) except asyncio.TimeoutError: - log.warning('Shard ID %s failed to wait for chunks (timeout=%.2f) for %d guilds', shard_id, - timeout, - len(guilds)) + _log.warning( + 'Shard ID %s failed to wait for chunks (timeout=%.2f) for %d guilds', shard_id, timeout, len(guilds) + ) for guild in children: if guild.unavailable is False: self.dispatch('guild_available', guild) @@ -1358,7 +1484,7 @@ class AutoShardedConnectionState(ConnectionState): try: del self._ready_state except AttributeError: - pass # already been deleted somehow + pass # already been deleted somehow # regular users cannot shard so we won't worry about it here. @@ -1369,12 +1495,13 @@ class AutoShardedConnectionState(ConnectionState): self.call_handlers('ready') self.dispatch('ready') - def parse_ready(self, data): + def parse_ready(self, data) -> None: if not hasattr(self, '_ready_state'): self._ready_state = asyncio.Queue() self.user = user = ClientUser(state=self, data=data['user']) - self._users[user.id] = user + # self._users is a list of Users, we're setting a ClientUser + self._users[user.id] = user # type: ignore if self.application_id is None: try: @@ -1397,6 +1524,6 @@ class AutoShardedConnectionState(ConnectionState): if self._ready_task is None: self._ready_task = asyncio.create_task(self._delay_ready()) - def parse_resumed(self, data): + def parse_resumed(self, data) -> None: self.dispatch('resumed') self.dispatch('shard_resumed', data['__shard_id__']) diff --git a/discord/sticker.py b/discord/sticker.py index 235b66f2..8ec2ad01 100644 --- a/discord/sticker.py +++ b/discord/sticker.py @@ -23,24 +23,224 @@ DEALINGS IN THE SOFTWARE. """ from __future__ import annotations -from typing import TYPE_CHECKING, List, Optional +from typing import Literal, TYPE_CHECKING, List, Optional, Tuple, Type, Union +import unicodedata from .mixins import Hashable -from .asset import Asset -from .utils import snowflake_time -from .enums import StickerType, try_enum +from .asset import Asset, AssetMixin +from .utils import cached_slot_property, find, snowflake_time, get, MISSING +from .errors import InvalidData +from .enums import StickerType, StickerFormatType, try_enum __all__ = ( + 'StickerPack', + 'StickerItem', 'Sticker', + 'StandardSticker', + 'GuildSticker', ) if TYPE_CHECKING: import datetime from .state import ConnectionState - from .types.message import Sticker as StickerPayload + from .user import User + from .guild import Guild + from .types.sticker import ( + StickerPack as StickerPackPayload, + StickerItem as StickerItemPayload, + Sticker as StickerPayload, + StandardSticker as StandardStickerPayload, + GuildSticker as GuildStickerPayload, + ListPremiumStickerPacks as ListPremiumStickerPacksPayload, + EditGuildSticker, + ) -class Sticker(Hashable): +class StickerPack(Hashable): + """Represents a sticker pack. + + .. versionadded:: 2.0 + + .. container:: operations + + .. describe:: str(x) + + Returns the name of the sticker pack. + + .. describe:: hash(x) + + Returns the hash of the sticker pack. + + .. describe:: int(x) + + Returns the ID of the sticker pack. + + .. describe:: x == y + + Checks if the sticker pack is equal to another sticker pack. + + .. describe:: x != y + + Checks if the sticker pack is not equal to another sticker pack. + + Attributes + ----------- + name: :class:`str` + The name of the sticker pack. + description: :class:`str` + The description of the sticker pack. + id: :class:`int` + The id of the sticker pack. + stickers: List[:class:`StandardSticker`] + The stickers of this sticker pack. + sku_id: :class:`int` + The SKU ID of the sticker pack. + cover_sticker_id: :class:`int` + The ID of the sticker used for the cover of the sticker pack. + cover_sticker: :class:`StandardSticker` + The sticker used for the cover of the sticker pack. + """ + + __slots__ = ( + '_state', + 'id', + 'stickers', + 'name', + 'sku_id', + 'cover_sticker_id', + 'cover_sticker', + 'description', + '_banner', + ) + + def __init__(self, *, state: ConnectionState, data: StickerPackPayload) -> None: + self._state: ConnectionState = state + self._from_data(data) + + def _from_data(self, data: StickerPackPayload) -> None: + self.id: int = int(data['id']) + stickers = data['stickers'] + self.stickers: List[StandardSticker] = [StandardSticker(state=self._state, data=sticker) for sticker in stickers] + self.name: str = data['name'] + self.sku_id: int = int(data['sku_id']) + self.cover_sticker_id: int = int(data['cover_sticker_id']) + self.cover_sticker: StandardSticker = get(self.stickers, id=self.cover_sticker_id) # type: ignore + self.description: str = data['description'] + self._banner: int = int(data['banner_asset_id']) + + @property + def banner(self) -> Asset: + """:class:`Asset`: The banner asset of the sticker pack.""" + return Asset._from_sticker_banner(self._state, self._banner) + + def __repr__(self) -> str: + return f'' + + def __str__(self) -> str: + return self.name + + +class _StickerTag(Hashable, AssetMixin): + __slots__ = () + + id: int + format: StickerFormatType + + async def read(self) -> bytes: + """|coro| + + Retrieves the content of this sticker as a :class:`bytes` object. + + .. note:: + + Stickers that use the :attr:`StickerFormatType.lottie` format cannot be read. + + Raises + ------ + HTTPException + Downloading the asset failed. + NotFound + The asset was deleted. + TypeError + The sticker is a lottie type. + + Returns + ------- + :class:`bytes` + The content of the asset. + """ + if self.format is StickerFormatType.lottie: + raise TypeError('Cannot read stickers of format "lottie".') + return await super().read() + + +class StickerItem(_StickerTag): + """Represents a sticker item. + + .. versionadded:: 2.0 + + .. container:: operations + + .. describe:: str(x) + + Returns the name of the sticker item. + + .. describe:: x == y + + Checks if the sticker item is equal to another sticker item. + + .. describe:: x != y + + Checks if the sticker item is not equal to another sticker item. + + Attributes + ----------- + name: :class:`str` + The sticker's name. + id: :class:`int` + The id of the sticker. + format: :class:`StickerFormatType` + The format for the sticker's image. + url: :class:`str` + The URL for the sticker's image. + """ + + __slots__ = ('_state', 'name', 'id', 'format', 'url') + + def __init__(self, *, state: ConnectionState, data: StickerItemPayload): + self._state: ConnectionState = state + self.name: str = data['name'] + self.id: int = int(data['id']) + self.format: StickerFormatType = try_enum(StickerFormatType, data['format_type']) + self.url: str = f'{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}' + + def __repr__(self) -> str: + return f'' + + def __str__(self) -> str: + return self.name + + async def fetch(self) -> Union[Sticker, StandardSticker, GuildSticker]: + """|coro| + + Attempts to retrieve the full sticker data of the sticker item. + + Raises + -------- + HTTPException + Retrieving the sticker failed. + + Returns + -------- + Union[:class:`StandardSticker`, :class:`GuildSticker`] + The retrieved sticker. + """ + data: StickerPayload = await self._state.http.get_sticker(self.id) + cls, _ = _sticker_factory(data['type']) # type: ignore + return cls(state=self._state, data=data) + + +class Sticker(_StickerTag): """Represents a sticker. .. versionadded:: 1.6 @@ -69,30 +269,27 @@ class Sticker(Hashable): The description of the sticker. pack_id: :class:`int` The id of the sticker's pack. - format: :class:`StickerType` + format: :class:`StickerFormatType` The format for the sticker's image. - tags: List[:class:`str`] - A list of tags for the sticker. + url: :class:`str` + The URL for the sticker's image. """ - __slots__ = ('_state', 'id', 'name', 'description', 'pack_id', 'format', '_image', 'tags') + __slots__ = ('_state', 'id', 'name', 'description', 'format', 'url') - def __init__(self, *, state: ConnectionState, data: StickerPayload): + def __init__(self, *, state: ConnectionState, data: StickerPayload) -> None: self._state: ConnectionState = state + self._from_data(data) + + def _from_data(self, data: StickerPayload) -> None: self.id: int = int(data['id']) self.name: str = data['name'] self.description: str = data['description'] - self.pack_id: int = int(data.get('pack_id', 0)) - self.format: StickerType = try_enum(StickerType, data['format_type']) - self._image: str = data['asset'] - - try: - self.tags: List[str] = [tag.strip() for tag in data['tags'].split(',')] - except KeyError: - self.tags = [] + self.format: StickerFormatType = try_enum(StickerFormatType, data['format_type']) + self.url: str = f'{Asset.BASE}/stickers/{self.id}.{self.format.file_extension}' def __repr__(self) -> str: - return f'<{self.__class__.__name__} id={self.id} name={self.name!r}>' + return f'' def __str__(self) -> str: return self.name @@ -102,19 +299,233 @@ class Sticker(Hashable): """:class:`datetime.datetime`: Returns the sticker's creation time in UTC.""" return snowflake_time(self.id) - @property - def image(self) -> Optional[Asset]: - """Returns an :class:`Asset` for the sticker's image. - .. note:: - This will return ``None`` if the format is ``StickerType.lottie``. +class StandardSticker(Sticker): + """Represents a sticker that is found in a standard sticker pack. + + .. versionadded:: 2.0 + + .. container:: operations + + .. describe:: str(x) + + Returns the name of the sticker. + + .. describe:: x == y + + Checks if the sticker is equal to another sticker. + + .. describe:: x != y + + Checks if the sticker is not equal to another sticker. + + Attributes + ---------- + name: :class:`str` + The sticker's name. + id: :class:`int` + The id of the sticker. + description: :class:`str` + The description of the sticker. + pack_id: :class:`int` + The id of the sticker's pack. + format: :class:`StickerFormatType` + The format for the sticker's image. + tags: List[:class:`str`] + A list of tags for the sticker. + sort_value: :class:`int` + The sticker's sort order within its pack. + """ + + __slots__ = ('sort_value', 'pack_id', 'type', 'tags') + + def _from_data(self, data: StandardStickerPayload) -> None: + super()._from_data(data) + self.sort_value: int = data['sort_value'] + self.pack_id: int = int(data['pack_id']) + self.type: StickerType = StickerType.standard + + try: + self.tags: List[str] = [tag.strip() for tag in data['tags'].split(',')] + except KeyError: + self.tags = [] + + def __repr__(self) -> str: + return f'' + + async def pack(self) -> StickerPack: + """|coro| + + Retrieves the sticker pack that this sticker belongs to. + + Raises + -------- + InvalidData + The corresponding sticker pack was not found. + HTTPException + Retrieving the sticker pack failed. Returns - ------- - Optional[:class:`Asset`] - The resulting CDN asset. + -------- + :class:`StickerPack` + The retrieved sticker pack. """ - if self.format is StickerType.lottie: - return None + data: ListPremiumStickerPacksPayload = await self._state.http.list_premium_sticker_packs() + packs = data['sticker_packs'] + pack = find(lambda d: int(d['id']) == self.pack_id, packs) - return Asset._from_sticker(self._state, self.id, self._image) + if pack: + return StickerPack(state=self._state, data=pack) + raise InvalidData(f'Could not find corresponding sticker pack for {self!r}') + + +class GuildSticker(Sticker): + """Represents a sticker that belongs to a guild. + + .. versionadded:: 2.0 + + .. container:: operations + + .. describe:: str(x) + + Returns the name of the sticker. + + .. describe:: x == y + + Checks if the sticker is equal to another sticker. + + .. describe:: x != y + + Checks if the sticker is not equal to another sticker. + + Attributes + ---------- + name: :class:`str` + The sticker's name. + id: :class:`int` + The id of the sticker. + description: :class:`str` + The description of the sticker. + format: :class:`StickerFormatType` + The format for the sticker's image. + available: :class:`bool` + Whether this sticker is available for use. + guild_id: :class:`int` + The ID of the guild that this sticker is from. + user: Optional[:class:`User`] + The user that created this sticker. This can only be retrieved using :meth:`Guild.fetch_sticker` and + having the :attr:`~Permissions.manage_emojis_and_stickers` permission. + emoji: :class:`str` + The name of a unicode emoji that represents this sticker. + """ + + __slots__ = ('available', 'guild_id', 'user', 'emoji', 'type', '_cs_guild') + + def _from_data(self, data: GuildStickerPayload) -> None: + super()._from_data(data) + self.available: bool = data['available'] + self.guild_id: int = int(data['guild_id']) + user = data.get('user') + self.user: Optional[User] = self._state.store_user(user) if user else None + self.emoji: str = data['tags'] + self.type: StickerType = StickerType.guild + + def __repr__(self) -> str: + return f'' + + @cached_slot_property('_cs_guild') + def guild(self) -> Optional[Guild]: + """Optional[:class:`Guild`]: The guild that this sticker is from. + Could be ``None`` if the bot is not in the guild. + + .. versionadded:: 2.0 + """ + return self._state._get_guild(self.guild_id) + + async def edit( + self, + *, + name: str = MISSING, + description: str = MISSING, + emoji: str = MISSING, + reason: Optional[str] = None, + ) -> GuildSticker: + """|coro| + + Edits a :class:`GuildSticker` for the guild. + + Parameters + ----------- + name: :class:`str` + The sticker's new name. Must be at least 2 characters. + description: Optional[:class:`str`] + The sticker's new description. Can be ``None``. + emoji: :class:`str` + The name of a unicode emoji that represents the sticker's expression. + reason: :class:`str` + The reason for editing this sticker. Shows up on the audit log. + + Raises + ------- + Forbidden + You are not allowed to edit stickers. + HTTPException + An error occurred editing the sticker. + + Returns + -------- + :class:`GuildSticker` + The newly modified sticker. + """ + payload: EditGuildSticker = {} + + if name is not MISSING: + payload['name'] = name + + if description is not MISSING: + payload['description'] = description + + if emoji is not MISSING: + try: + emoji = unicodedata.name(emoji) + except TypeError: + pass + else: + emoji = emoji.replace(' ', '_') + + payload['tags'] = emoji + + data: GuildStickerPayload = await self._state.http.modify_guild_sticker(self.guild_id, self.id, payload, reason) + return GuildSticker(state=self._state, data=data) + + async def delete(self, *, reason: Optional[str] = None) -> None: + """|coro| + + Deletes the custom :class:`Sticker` from the guild. + + You must have :attr:`~Permissions.manage_emojis_and_stickers` permission to + do this. + + Parameters + ----------- + reason: Optional[:class:`str`] + The reason for deleting this sticker. Shows up on the audit log. + + Raises + ------- + Forbidden + You are not allowed to delete stickers. + HTTPException + An error occurred deleting the sticker. + """ + await self._state.http.delete_guild_sticker(self.guild_id, self.id, reason) + + +def _sticker_factory(sticker_type: Literal[1, 2]) -> Tuple[Type[Union[StandardSticker, GuildSticker, Sticker]], StickerType]: + value = try_enum(StickerType, sticker_type) + if value == StickerType.standard: + return StandardSticker, value + elif value == StickerType.guild: + return GuildSticker, value + else: + return Sticker, value diff --git a/discord/template.py b/discord/template.py index 045e1878..30af3a4d 100644 --- a/discord/template.py +++ b/discord/template.py @@ -24,7 +24,7 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations -from typing import Any, Optional, TYPE_CHECKING, overload +from typing import Any, Optional, TYPE_CHECKING from .utils import parse_time, _get_as_snowflake, _bytes_to_base64_data, MISSING from .enums import VoiceRegion from .guild import Guild @@ -34,7 +34,10 @@ __all__ = ( ) if TYPE_CHECKING: + import datetime from .types.template import Template as TemplatePayload + from .state import ConnectionState + from .user import User class _FriendlyHttpAttributeErrorHelper: @@ -77,7 +80,7 @@ class _PartialTemplateState: def _get_guild(self, id): return self.__state._get_guild(id) - async def query_members(self, **kwargs): + async def query_members(self, **kwargs: Any): return [] def __getattr__(self, attr): @@ -127,33 +130,35 @@ class Template: '_state', ) - def __init__(self, *, state, data: TemplatePayload): + def __init__(self, *, state: ConnectionState, data: TemplatePayload) -> None: self._state = state self._store(data) - def _store(self, data: TemplatePayload): - self.code = data['code'] - self.uses = data['usage_count'] - self.name = data['name'] - self.description = data['description'] + def _store(self, data: TemplatePayload) -> None: + self.code: str = data['code'] + self.uses: int = data['usage_count'] + self.name: str = data['name'] + self.description: Optional[str] = data['description'] creator_data = data.get('creator') - self.creator = None if creator_data is None else self._state.store_user(creator_data) + self.creator: Optional[User] = None if creator_data is None else self._state.create_user(creator_data) - self.created_at = parse_time(data.get('created_at')) - self.updated_at = parse_time(data.get('updated_at')) + self.created_at: Optional[datetime.datetime] = parse_time(data.get('created_at')) + self.updated_at: Optional[datetime.datetime] = parse_time(data.get('updated_at')) - id = _get_as_snowflake(data, 'source_guild_id') + guild_id = int(data['source_guild_id']) + guild: Optional[Guild] = self._state._get_guild(guild_id) - guild = self._state._get_guild(id) - - if guild is None and id: + self.source_guild: Guild + if guild is None: source_serialised = data['serialized_source_guild'] - source_serialised['id'] = id + source_serialised['id'] = guild_id state = _PartialTemplateState(state=self._state) - guild = Guild(data=source_serialised, state=state) # type: ignore + # Guild expects a ConnectionState, we're passing a _PartialTemplateState + self.source_guild = Guild(data=source_serialised, state=state) # type: ignore + else: + self.source_guild = guild - self.source_guild = guild - self.is_dirty = data.get('is_dirty', None) + self.is_dirty: Optional[bool] = data.get('is_dirty', None) def __repr__(self) -> str: return ( @@ -161,7 +166,7 @@ class Template: f' creator={self.creator!r} source_guild={self.source_guild!r} is_dirty={self.is_dirty}>' ) - async def create_guild(self, name: str, region: Optional[VoiceRegion] = None, icon: Any = None): + async def create_guild(self, name: str, region: Optional[VoiceRegion] = None, icon: Any = None) -> Guild: """|coro| Creates a :class:`.Guild` using the template. @@ -201,7 +206,7 @@ class Template: data = await self._state.http.create_from_template(self.code, name, region_value, icon) return Guild(data=data, state=self._state) - async def sync(self) -> None: + async def sync(self) -> Template: """|coro| Sync the template to the guild's current state. @@ -211,6 +216,9 @@ class Template: .. versionadded:: 1.7 + .. versionchanged:: 2.0 + The template is no longer edited in-place, instead it is returned. + Raises ------- HTTPException @@ -219,17 +227,22 @@ class Template: You don't have permissions to edit the template. NotFound This template does not exist. + + Returns + -------- + :class:`Template` + The newly edited template. """ data = await self._state.http.sync_template(self.source_guild.id, self.code) - self._store(data) + return Template(state=self._state, data=data) async def edit( self, *, name: str = MISSING, description: Optional[str] = MISSING, - ) -> None: + ) -> Template: """|coro| Edit the template metadata. @@ -239,6 +252,9 @@ class Template: .. versionadded:: 1.7 + .. versionchanged:: 2.0 + The template is no longer edited in-place, instead it is returned. + Parameters ------------ name: :class:`str` @@ -254,6 +270,11 @@ class Template: You don't have permissions to edit the template. NotFound This template does not exist. + + Returns + -------- + :class:`Template` + The newly edited template. """ payload = {} @@ -263,7 +284,7 @@ class Template: payload['description'] = description data = await self._state.http.edit_template(self.source_guild.id, self.code, payload) - self._store(data) + return Template(state=self._state, data=data) async def delete(self) -> None: """|coro| diff --git a/discord/threads.py b/discord/threads.py index 682e56dd..6f8ffb00 100644 --- a/discord/threads.py +++ b/discord/threads.py @@ -46,8 +46,9 @@ if TYPE_CHECKING: ThreadMetadata, ThreadArchiveDuration, ) + from .types.snowflake import SnowflakeList from .guild import Guild - from .channel import TextChannel + from .channel import TextChannel, CategoryChannel from .member import Member from .message import Message, PartialMessage from .abc import Snowflake, SnowflakeTime @@ -73,6 +74,10 @@ class Thread(Messageable, Hashable): Returns the thread's hash. + .. describe:: int(x) + + Returns the thread's ID. + .. describe:: str(x) Returns the thread's name. @@ -110,6 +115,9 @@ class Thread(Messageable, Hashable): Whether the thread is archived. locked: :class:`bool` Whether the thread is locked. + invitable: :class:`bool` + Whether non-moderators can add other non-moderators to this thread. + This is always ``True`` for public threads. archiver_id: Optional[:class:`int`] The user's ID that archived this thread. auto_archive_duration: :class:`int` @@ -135,6 +143,7 @@ class Thread(Messageable, Hashable): 'me', 'locked', 'archived', + 'invitable', 'archiver_id', 'auto_archive_duration', 'archive_timestamp', @@ -166,6 +175,8 @@ class Thread(Messageable, Hashable): self._type = try_enum(ChannelType, data['type']) self.last_message_id = _get_as_snowflake(data, 'last_message_id') self.slowmode_delay = data.get('rate_limit_per_user', 0) + self.message_count = data['message_count'] + self.member_count = data['member_count'] self._unroll_metadata(data['thread_metadata']) try: @@ -181,6 +192,7 @@ class Thread(Messageable, Hashable): self.auto_archive_duration = data['auto_archive_duration'] self.archive_timestamp = parse_time(data['archive_timestamp']) self.locked = data.get('locked', False) + self.invitable = data.get('invitable', True) def _update(self, data): try: @@ -215,6 +227,16 @@ class Thread(Messageable, Hashable): """:class:`str`: The string that allows you to mention the thread.""" return f'<#{self.id}>' + @property + def members(self) -> List[ThreadMember]: + """List[:class:`ThreadMember`]: A list of thread members in this thread. + + 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. + """ + return list(self._members.values()) + @property def last_message(self) -> Optional[Message]: """Fetches the last message from this channel in cache. @@ -236,6 +258,26 @@ class Thread(Messageable, Hashable): """ return self._state._get_message(self.last_message_id) if self.last_message_id else None + @property + def category(self) -> Optional[CategoryChannel]: + """The category channel the parent channel belongs to, if applicable. + + Raises + ------- + ClientException + The parent channel was not cached and returned ``None``. + + Returns + ------- + Optional[:class:`CategoryChannel`] + The parent channel's category. + """ + + parent = self.parent + if parent is None: + raise ClientException('Parent channel not found') + return parent.category + @property def category_id(self) -> Optional[int]: """The category channel ID the parent channel belongs to, if applicable. @@ -362,7 +404,7 @@ class Thread(Messageable, Hashable): if len(messages) > 100: raise ClientException('Can only bulk delete messages up to 100 messages') - message_ids = [m.id for m in messages] + message_ids: SnowflakeList = [m.id for m in messages] await self._state.http.delete_messages(self.id, message_ids) async def purge( @@ -488,9 +530,10 @@ class Thread(Messageable, Hashable): name: str = MISSING, archived: bool = MISSING, locked: bool = MISSING, + invitable: bool = MISSING, slowmode_delay: int = MISSING, auto_archive_duration: ThreadArchiveDuration = MISSING, - ): + ) -> Thread: """|coro| Edits the thread. @@ -510,8 +553,11 @@ class Thread(Messageable, Hashable): Whether to archive the thread or not. locked: :class:`bool` Whether to lock the thread or not. + invitable: :class:`bool` + Whether non-moderators can add other non-moderators to this thread. + Only available for private threads. auto_archive_duration: :class:`int` - The new duration to auto archive threads for inactivity. + The new duration in minutes before a thread is automatically archived for inactivity. Must be one of ``60``, ``1440``, ``4320``, or ``10080``. slowmode_delay: :class:`int` Specifies the slowmode rate limit for user in this thread, in seconds. @@ -523,6 +569,11 @@ class Thread(Messageable, Hashable): You do not have permissions to edit the thread. HTTPException Editing the thread failed. + + Returns + -------- + :class:`Thread` + The newly edited thread. """ payload = {} if name is not MISSING: @@ -533,20 +584,22 @@ class Thread(Messageable, Hashable): payload['auto_archive_duration'] = auto_archive_duration if locked is not MISSING: payload['locked'] = locked + if invitable is not MISSING: + payload['invitable'] = invitable if slowmode_delay is not MISSING: payload['rate_limit_per_user'] = slowmode_delay - await self._state.http.edit_channel(self.id, **payload) + data = await self._state.http.edit_channel(self.id, **payload) + # The data payload will always be a Thread payload + return Thread(data=data, state=self._state, guild=self.guild) # type: ignore async def join(self): """|coro| Joins this thread. - You must have :attr:`~Permissions.send_messages` and :attr:`~Permissions.use_threads` - to join a public thread. If the thread is private then :attr:`~Permissions.send_messages` - and either :attr:`~Permissions.use_private_threads` or :attr:`~Permissions.manage_messages` - is required to join the thread. + 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. Raises ------- @@ -614,6 +667,28 @@ class Thread(Messageable, Hashable): """ await self._state.http.remove_user_from_thread(self.id, user.id) + async def fetch_members(self) -> List[ThreadMember]: + """|coro| + + Retrieves all :class:`ThreadMember` that are in this thread. + + This requires :attr:`Intents.members` to get information about members + other than yourself. + + Raises + ------- + HTTPException + Retrieving the members failed. + + Returns + -------- + List[:class:`ThreadMember`] + All thread members in the thread. + """ + + members = await self._state.http.get_thread_members(self.id) + return [ThreadMember(parent=self, data=data) for data in members] + async def delete(self): """|coro| @@ -677,6 +752,10 @@ class ThreadMember(Hashable): Returns the thread member's hash. + .. describe:: int(x) + + Returns the thread member's ID. + .. describe:: str(x) Returns the thread member's name. diff --git a/discord/types/appinfo.py b/discord/types/appinfo.py index d223837f..912d5ad5 100644 --- a/discord/types/appinfo.py +++ b/discord/types/appinfo.py @@ -61,6 +61,7 @@ class _PartialAppInfoOptional(TypedDict, total=False): terms_of_service_url: str privacy_policy_url: str max_participants: int + flags: int class PartialAppInfo(_PartialAppInfoOptional, BaseAppInfo): pass diff --git a/discord/types/audit_log.py b/discord/types/audit_log.py index 5624829c..563819fd 100644 --- a/discord/types/audit_log.py +++ b/discord/types/audit_log.py @@ -32,6 +32,7 @@ from .user import User from .snowflake import Snowflake from .role import Role from .channel import ChannelType, VideoQualityMode, PermissionOverwrite +from .threads import Thread AuditLogEvent = Literal[ 1, @@ -69,19 +70,28 @@ AuditLogEvent = Literal[ 80, 81, 82, + 83, + 84, + 85, + 90, + 91, + 92, + 110, + 111, + 112, ] class _AuditLogChange_Str(TypedDict): key: Literal[ - 'name', 'description', 'preferred_locale', 'vanity_url_code', 'topic', 'code', 'allow', 'deny', 'permissions' + 'name', 'description', 'preferred_locale', 'vanity_url_code', 'topic', 'code', 'allow', 'deny', 'permissions', 'tags' ] new_value: str old_value: str class _AuditLogChange_AssetHash(TypedDict): - key: Literal['icon_hash', 'splash_hash', 'discovery_splash_hash', 'banner_hash', 'avatar_hash'] + key: Literal['icon_hash', 'splash_hash', 'discovery_splash_hash', 'banner_hash', 'avatar_hash', 'asset'] new_value: str old_value: str @@ -98,6 +108,7 @@ class _AuditLogChange_Snowflake(TypedDict): 'application_id', 'channel_id', 'inviter_id', + 'guild_id', ] new_value: Snowflake old_value: Snowflake @@ -116,6 +127,9 @@ class _AuditLogChange_Bool(TypedDict): 'enabled_emoticons', 'region', 'rtc_region', + 'available', + 'archived', + 'locked', ] new_value: bool old_value: bool @@ -132,6 +146,8 @@ class _AuditLogChange_Int(TypedDict): 'max_uses', 'max_age', 'user_limit', + 'auto_archive_duration', + 'default_auto_archive_duration', ] new_value: int old_value: int @@ -238,3 +254,4 @@ class AuditLog(TypedDict): users: List[User] audit_log_entries: List[AuditLogEntry] integrations: List[PartialIntegration] + threads: List[Thread] diff --git a/discord/types/channel.py b/discord/types/channel.py index 42be8591..a35351e4 100644 --- a/discord/types/channel.py +++ b/discord/types/channel.py @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. from typing import List, Literal, Optional, TypedDict, Union from .user import PartialUser from .snowflake import Snowflake -from .threads import ThreadMetadata, ThreadMember +from .threads import ThreadMetadata, ThreadMember, ThreadArchiveDuration OverwriteType = Literal[0, 1] @@ -63,6 +63,7 @@ class _TextChannelOptional(TypedDict, total=False): last_message_id: Optional[Snowflake] last_pin_timestamp: str rate_limit_per_user: int + default_auto_archive_duration: ThreadArchiveDuration class TextChannel(_BaseGuildChannel, _TextChannelOptional): @@ -115,7 +116,7 @@ class _ThreadChannelOptional(TypedDict, total=False): class ThreadChannel(_BaseChannel, _ThreadChannelOptional): - type: Literal[11, 12] + type: Literal[10, 11, 12] guild_id: Snowflake parent_id: Snowflake owner_id: Snowflake diff --git a/discord/types/components.py b/discord/types/components.py index 551a97ac..3d689e8e 100644 --- a/discord/types/components.py +++ b/discord/types/components.py @@ -53,6 +53,7 @@ class _SelectMenuOptional(TypedDict, total=False): placeholder: str min_values: int max_values: int + disabled: bool class _SelectOptionsOptional(TypedDict, total=False): diff --git a/discord/types/interactions.py b/discord/types/interactions.py index bed0837e..b0ce156b 100644 --- a/discord/types/interactions.py +++ b/discord/types/interactions.py @@ -37,8 +37,11 @@ if TYPE_CHECKING: from .message import AllowedMentions, Message +ApplicationCommandType = Literal[1, 2, 3] + class _ApplicationCommandOptional(TypedDict, total=False): options: List[ApplicationCommandOption] + type: ApplicationCommandType class ApplicationCommand(_ApplicationCommandOptional): @@ -53,7 +56,7 @@ class _ApplicationCommandOptionOptional(TypedDict, total=False): options: List[ApplicationCommandOption] -ApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9] +ApplicationCommandOptionType = Literal[1, 2, 3, 4, 5, 6, 7, 8, 9, 10] class ApplicationCommandOption(_ApplicationCommandOptionOptional): @@ -122,12 +125,18 @@ class _ApplicationCommandInteractionDataOptionSnowflake(_ApplicationCommandInter value: Snowflake +class _ApplicationCommandInteractionDataOptionNumber(_ApplicationCommandInteractionDataOption): + type: Literal[10] + value: float + + ApplicationCommandInteractionDataOption = Union[ _ApplicationCommandInteractionDataOptionString, _ApplicationCommandInteractionDataOptionInteger, _ApplicationCommandInteractionDataOptionSubcommand, _ApplicationCommandInteractionDataOptionBoolean, _ApplicationCommandInteractionDataOptionSnowflake, + _ApplicationCommandInteractionDataOptionNumber, ] @@ -148,6 +157,8 @@ class ApplicationCommandInteractionDataResolved(TypedDict, total=False): class _ApplicationCommandInteractionDataOptional(TypedDict, total=False): options: List[ApplicationCommandInteractionDataOption] resolved: ApplicationCommandInteractionDataResolved + target_id: Snowflake + type: ApplicationCommandType class ApplicationCommandInteractionData(_ApplicationCommandInteractionDataOptional): @@ -211,8 +222,15 @@ class MessageInteraction(TypedDict): user: User -class EditApplicationCommand(TypedDict): - name: str + + + +class _EditApplicationCommandOptional(TypedDict, total=False): description: str options: Optional[List[ApplicationCommandOption]] + type: ApplicationCommandType + + +class EditApplicationCommand(_EditApplicationCommandOptional): + name: str default_permission: bool diff --git a/discord/types/member.py b/discord/types/member.py index d93005e8..f1e81c00 100644 --- a/discord/types/member.py +++ b/discord/types/member.py @@ -39,6 +39,7 @@ class PartialMember(TypedDict): class Member(PartialMember, total=False): + avatar: str user: User nick: str premium_since: str @@ -46,16 +47,17 @@ class Member(PartialMember, total=False): permissions: str -class _OptionalGatewayMember(PartialMember, total=False): +class _OptionalMemberWithUser(PartialMember, total=False): + avatar: str nick: str premium_since: str pending: bool permissions: str -class GatewayMember(_OptionalGatewayMember): +class MemberWithUser(_OptionalMemberWithUser): user: User class UserWithMember(User, total=False): - member: _OptionalGatewayMember + member: _OptionalMemberWithUser diff --git a/discord/types/message.py b/discord/types/message.py index 2dbdf983..5448a56a 100644 --- a/discord/types/message.py +++ b/discord/types/message.py @@ -33,6 +33,7 @@ from .embed import Embed from .channel import ChannelType from .components import Component from .interactions import MessageInteraction +from .sticker import StickerItem class ChannelMention(TypedDict): @@ -89,22 +90,6 @@ class MessageReference(TypedDict, total=False): fail_if_not_exists: bool -class _StickerOptional(TypedDict, total=False): - tags: str - - -StickerFormatType = Literal[1, 2, 3] - - -class Sticker(_StickerOptional): - id: Snowflake - pack_id: Snowflake - name: str - description: str - asset: str - format_type: StickerFormatType - - class _MessageOptional(TypedDict, total=False): guild_id: Snowflake member: Member @@ -117,7 +102,7 @@ class _MessageOptional(TypedDict, total=False): application_id: Snowflake message_reference: MessageReference flags: int - stickers: List[Sticker] + sticker_items: List[StickerItem] referenced_message: Optional[Message] interaction: MessageInteraction components: List[Component] diff --git a/discord/types/raw_models.py b/discord/types/raw_models.py new file mode 100644 index 00000000..3c45b299 --- /dev/null +++ b/discord/types/raw_models.py @@ -0,0 +1,87 @@ +""" +The MIT License (MIT) + +Copyright (c) 2015-present Rapptz + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +""" + +from typing import TypedDict, List +from .snowflake import Snowflake +from .member import Member +from .emoji import PartialEmoji + + +class _MessageEventOptional(TypedDict, total=False): + guild_id: Snowflake + + +class MessageDeleteEvent(_MessageEventOptional): + id: Snowflake + channel_id: Snowflake + + +class BulkMessageDeleteEvent(_MessageEventOptional): + ids: List[Snowflake] + channel_id: Snowflake + + +class _ReactionActionEventOptional(TypedDict, total=False): + guild_id: Snowflake + member: Member + + +class MessageUpdateEvent(_MessageEventOptional): + id: Snowflake + channel_id: Snowflake + + +class ReactionActionEvent(_ReactionActionEventOptional): + user_id: Snowflake + channel_id: Snowflake + message_id: Snowflake + emoji: PartialEmoji + + +class _ReactionClearEventOptional(TypedDict, total=False): + guild_id: Snowflake + + +class ReactionClearEvent(_ReactionClearEventOptional): + channel_id: Snowflake + message_id: Snowflake + + +class _ReactionClearEmojiEventOptional(TypedDict, total=False): + guild_id: Snowflake + + +class ReactionClearEmojiEvent(_ReactionClearEmojiEventOptional): + channel_id: int + message_id: int + emoji: PartialEmoji + + +class _IntegrationDeleteEventOptional(TypedDict, total=False): + application_id: Snowflake + + +class IntegrationDeleteEvent(_IntegrationDeleteEventOptional): + id: Snowflake + guild_id: Snowflake diff --git a/discord/types/sticker.py b/discord/types/sticker.py new file mode 100644 index 00000000..ec6922a8 --- /dev/null +++ b/discord/types/sticker.py @@ -0,0 +1,93 @@ +""" +The MIT License (MIT) + +Copyright (c) 2015-present Rapptz + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +""" + +from __future__ import annotations + +from typing import List, Literal, TypedDict, Union +from .snowflake import Snowflake +from .user import User + +StickerFormatType = Literal[1, 2, 3] + + +class StickerItem(TypedDict): + id: Snowflake + name: str + format_type: StickerFormatType + + +class BaseSticker(TypedDict): + id: Snowflake + name: str + description: str + tags: str + format_type: StickerFormatType + + +class StandardSticker(BaseSticker): + type: Literal[1] + sort_value: int + pack_id: Snowflake + + +class _GuildStickerOptional(TypedDict, total=False): + user: User + + +class GuildSticker(BaseSticker, _GuildStickerOptional): + type: Literal[2] + available: bool + guild_id: Snowflake + + +Sticker = Union[BaseSticker, StandardSticker, GuildSticker] + + +class StickerPack(TypedDict): + id: Snowflake + stickers: List[StandardSticker] + name: str + sku_id: Snowflake + cover_sticker_id: Snowflake + description: str + banner_asset_id: Snowflake + + +class _CreateGuildStickerOptional(TypedDict, total=False): + description: str + + +class CreateGuildSticker(_CreateGuildStickerOptional): + name: str + tags: str + + +class EditGuildSticker(TypedDict, total=False): + name: str + tags: str + description: str + + +class ListPremiumStickerPacks(TypedDict): + sticker_packs: List[StickerPack] diff --git a/discord/types/threads.py b/discord/types/threads.py index baf8def4..328be131 100644 --- a/discord/types/threads.py +++ b/discord/types/threads.py @@ -41,6 +41,7 @@ class ThreadMember(TypedDict): class _ThreadMetadataOptional(TypedDict, total=False): archiver_id: Snowflake locked: bool + invitable: bool class ThreadMetadata(_ThreadMetadataOptional): diff --git a/discord/types/voice.py b/discord/types/voice.py index b29288d4..f9d1df3d 100644 --- a/discord/types/voice.py +++ b/discord/types/voice.py @@ -24,14 +24,14 @@ DEALINGS IN THE SOFTWARE. from typing import Optional, TypedDict, List, Literal from .snowflake import Snowflake -from .member import Member +from .member import MemberWithUser SupportedModes = Literal['xsalsa20_poly1305_lite', 'xsalsa20_poly1305_suffix', 'xsalsa20_poly1305'] class _PartialVoiceStateOptional(TypedDict, total=False): - member: Member + member: MemberWithUser self_stream: bool diff --git a/discord/ui/select.py b/discord/ui/select.py index e8fe68ad..8479ca15 100644 --- a/discord/ui/select.py +++ b/discord/ui/select.py @@ -78,6 +78,8 @@ class Select(Item[V]): Defaults to 1 and must be between 1 and 25. options: List[:class:`discord.SelectOption`] A list of options that can be selected in this menu. + disabled: :class:`bool` + Whether the select is disabled or not. row: Optional[:class:`int`] 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 @@ -91,6 +93,7 @@ class Select(Item[V]): 'min_values', 'max_values', 'options', + 'disabled', ) def __init__( @@ -101,8 +104,10 @@ class Select(Item[V]): min_values: int = 1, max_values: int = 1, options: List[SelectOption] = MISSING, + disabled: bool = False, row: Optional[int] = None, ) -> None: + super().__init__() self._selected_values: List[str] = [] self._provided_custom_id = custom_id is not MISSING custom_id = os.urandom(16).hex() if custom_id is MISSING else custom_id @@ -114,6 +119,7 @@ class Select(Item[V]): min_values=min_values, max_values=max_values, options=options, + disabled=disabled, ) self.row = row @@ -191,13 +197,13 @@ class Select(Item[V]): ----------- label: :class:`str` The label of the option. This is displayed to users. - Can only be up to 25 characters. + Can only be up to 100 characters. value: :class:`str` 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. description: Optional[:class:`str`] An additional description of the option, if any. - Can only be up to 50 characters. + Can only be up to 100 characters. emoji: Optional[Union[:class:`str`, :class:`.Emoji`, :class:`.PartialEmoji`]] 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`. @@ -240,6 +246,15 @@ class Select(Item[V]): self._underlying.options.append(option) + @property + def disabled(self) -> bool: + """:class:`bool`: Whether the select is disabled or not.""" + return self._underlying.disabled + + @disabled.setter + def disabled(self, value: bool): + self._underlying.disabled = bool(value) + @property def values(self) -> List[str]: """List[:class:`str`]: A list of values that have been selected by the user.""" @@ -267,6 +282,7 @@ class Select(Item[V]): min_values=component.min_values, max_values=component.max_values, options=component.options, + disabled=component.disabled, row=None, ) @@ -285,6 +301,7 @@ def select( min_values: int = 1, max_values: int = 1, options: List[SelectOption] = MISSING, + disabled: bool = False, row: Optional[int] = None, ) -> Callable[[ItemCallbackType], ItemCallbackType]: """A decorator that attaches a select menu to a component. @@ -317,11 +334,13 @@ def select( Defaults to 1 and must be between 1 and 25. options: List[:class:`discord.SelectOption`] A list of options that can be selected in this menu. + disabled: :class:`bool` + Whether the select is disabled or not. Defaults to ``False``. """ def decorator(func: ItemCallbackType) -> ItemCallbackType: if not inspect.iscoroutinefunction(func): - raise TypeError('button function must be a coroutine function') + raise TypeError('select function must be a coroutine function') func.__discord_ui_model_type__ = Select func.__discord_ui_model_kwargs__ = { @@ -331,6 +350,7 @@ def select( 'min_values': min_values, 'max_values': max_values, 'options': options, + 'disabled': disabled, } return func diff --git a/discord/ui/view.py b/discord/ui/view.py index 462b6f83..13510eea 100644 --- a/discord/ui/view.py +++ b/discord/ui/view.py @@ -456,8 +456,8 @@ class View: class ViewStore: def __init__(self, state: ConnectionState): - # (component_type, custom_id): (View, Item) - self._views: Dict[Tuple[int, str], Tuple[View, Item]] = {} + # (component_type, message_id, custom_id): (View, Item) + self._views: Dict[Tuple[int, Optional[int], str], Tuple[View, Item]] = {} # message_id: View self._synced_message_views: Dict[int, View] = {} self._state: ConnectionState = state @@ -474,8 +474,7 @@ class ViewStore: return list(views.values()) def __verify_integrity(self): - to_remove: List[Tuple[int, str]] = [] - now = time.monotonic() + to_remove: List[Tuple[int, Optional[int], str]] = [] for (k, (view, _)) in self._views.items(): if view.is_finished(): to_remove.append(k) @@ -489,7 +488,7 @@ class ViewStore: view._start_listening_from_store(self) for item in view.children: if item.is_dispatchable(): - self._views[(item.type.value, item.custom_id)] = (view, item) # type: ignore + self._views[(item.type.value, message_id, item.custom_id)] = (view, item) # type: ignore if message_id is not None: self._synced_message_views[message_id] = view @@ -506,8 +505,11 @@ class ViewStore: def dispatch(self, component_type: int, custom_id: str, interaction: Interaction): self.__verify_integrity() - key = (component_type, custom_id) - value = self._views.get(key) + message_id: Optional[int] = interaction.message and interaction.message.id + key = (component_type, message_id, custom_id) + # Fallback to None message_id searches in case a persistent view + # was added without an associated message_id + value = self._views.get(key) or self._views.get((component_type, None, custom_id)) if value is None: return diff --git a/discord/user.py b/discord/user.py index 261eea87..3fa090a9 100644 --- a/discord/user.py +++ b/discord/user.py @@ -22,19 +22,35 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ -from typing import Any, Dict, Optional, TYPE_CHECKING +from __future__ import annotations + +from typing import Any, Dict, List, Optional, Type, TypeVar, TYPE_CHECKING + import discord.abc +from .asset import Asset +from .colour import Colour +from .enums import DefaultAvatar from .flags import PublicUserFlags from .utils import snowflake_time, _bytes_to_base64_data, MISSING -from .enums import DefaultAvatar -from .colour import Colour -from .asset import Asset + +if TYPE_CHECKING: + from datetime import datetime + + from .channel import DMChannel + from .guild import Guild + from .message import Message + from .state import ConnectionState + from .types.channel import DMChannel as DMChannelPayload + from .types.user import User as UserPayload + __all__ = ( 'User', 'ClientUser', ) +BU = TypeVar('BU', bound='BaseUser') + class _UserTag: __slots__ = () @@ -42,7 +58,18 @@ class _UserTag: class BaseUser(_UserTag): - __slots__ = ('name', 'id', 'discriminator', '_avatar', 'bot', 'system', '_public_flags', '_state') + __slots__ = ( + 'name', + 'id', + 'discriminator', + '_avatar', + '_banner', + '_accent_colour', + 'bot', + 'system', + '_public_flags', + '_state', + ) if TYPE_CHECKING: name: str @@ -50,53 +77,65 @@ class BaseUser(_UserTag): discriminator: str bot: bool system: bool + _state: ConnectionState + _avatar: Optional[str] + _banner: Optional[str] + _accent_colour: Optional[str] + _public_flags: int - def __init__(self, *, state, data): + def __init__(self, *, state: ConnectionState, data: UserPayload) -> None: self._state = state self._update(data) - def __repr__(self): + def __repr__(self) -> str: return ( f"" ) - def __str__(self): + def __str__(self) -> str: return f'{self.name}#{self.discriminator}' - def __eq__(self, other): + def __int__(self) -> int: + return self.id + + def __eq__(self, other: Any) -> bool: return isinstance(other, _UserTag) and other.id == self.id - def __ne__(self, other): + def __ne__(self, other: Any) -> bool: return not self.__eq__(other) - def __hash__(self): + def __hash__(self) -> int: return self.id >> 22 - def _update(self, data): + def _update(self, data: UserPayload) -> None: self.name = data['username'] self.id = int(data['id']) self.discriminator = data['discriminator'] self._avatar = data['avatar'] + self._banner = data.get('banner', None) + self._accent_colour = data.get('accent_color', None) self._public_flags = data.get('public_flags', 0) self.bot = data.get('bot', False) self.system = data.get('system', False) @classmethod - def _copy(cls, user): + def _copy(cls: Type[BU], user: BU) -> BU: self = cls.__new__(cls) # bypass __init__ self.name = user.name self.id = user.id self.discriminator = user.discriminator self._avatar = user._avatar + self._banner = user._banner + self._accent_colour = user._accent_colour self.bot = user.bot self._state = user._state self._public_flags = user._public_flags return self - def _to_minimal_user_json(self): + def _to_minimal_user_json(self) -> Dict[str, Any]: return { 'username': self.name, 'id': self.id, @@ -106,29 +145,82 @@ class BaseUser(_UserTag): } @property - def public_flags(self): + def public_flags(self) -> PublicUserFlags: """:class:`PublicUserFlags`: The publicly available flags the user has.""" return PublicUserFlags._from_value(self._public_flags) @property - def avatar(self): - """:class:`Asset`: Returns an :class:`Asset` for the avatar the user has. + def avatar(self) -> Optional[Asset]: + """Optional[:class:`Asset`]: Returns an :class:`Asset` for the avatar the user has. - If the user does not have a traditional avatar, an asset for - the default avatar is returned instead. + If the user does not have a traditional avatar, ``None`` is returned. + If you want the avatar that a user has displayed, consider :attr:`display_avatar`. """ - if self._avatar is None: - return Asset._from_default_avatar(self._state, int(self.discriminator) % len(DefaultAvatar)) - else: + if self._avatar is not None: return Asset._from_avatar(self._state, self.id, self._avatar) + return None @property - def default_avatar(self): + def default_avatar(self) -> Asset: """:class:`Asset`: Returns the default avatar for a given user. This is calculated by the user's discriminator.""" return Asset._from_default_avatar(self._state, int(self.discriminator) % len(DefaultAvatar)) @property - def colour(self): + def display_avatar(self) -> Asset: + """:class:`Asset`: Returns the user's display avatar. + + For regular users this is just their default avatar or uploaded avatar. + + .. versionadded:: 2.0 + """ + return self.avatar or self.default_avatar + + @property + def banner(self) -> Optional[Asset]: + """Optional[:class:`Asset`]: Returns the user's banner asset, if available. + + .. versionadded:: 2.0 + + + .. note:: + This information is only available via :meth:`Client.fetch_user`. + """ + if self._banner is None: + return None + return Asset._from_user_banner(self._state, self.id, self._banner) + + @property + def accent_colour(self) -> Optional[Colour]: + """Optional[:class:`Colour`]: Returns the user's accent colour, if applicable. + + There is an alias for this named :attr:`accent_color`. + + .. versionadded:: 2.0 + + .. note:: + + This information is only available via :meth:`Client.fetch_user`. + """ + if self._accent_colour is None: + return None + return Colour(self._accent_colour) + + @property + def accent_color(self) -> Optional[Colour]: + """Optional[:class:`Colour`]: Returns the user's accent color, if applicable. + + There is an alias for this named :attr:`accent_colour`. + + .. versionadded:: 2.0 + + .. note:: + + This information is only available via :meth:`Client.fetch_user`. + """ + return self.accent_colour + + @property + def colour(self) -> Colour: """:class:`Colour`: A property that returns a colour denoting the rendered colour for the user. This always returns :meth:`Colour.default`. @@ -137,7 +229,7 @@ class BaseUser(_UserTag): return Colour.default() @property - def color(self): + def color(self) -> Colour: """:class:`Colour`: A property that returns a color denoting the rendered color for the user. This always returns :meth:`Colour.default`. @@ -146,12 +238,12 @@ class BaseUser(_UserTag): return self.colour @property - def mention(self): + def mention(self) -> str: """:class:`str`: Returns a string that allows you to mention the given user.""" return f'<@{self.id}>' @property - def created_at(self): + def created_at(self) -> datetime: """:class:`datetime.datetime`: Returns the user's creation time in UTC. This is when the user's Discord account was created. @@ -159,7 +251,7 @@ class BaseUser(_UserTag): return snowflake_time(self.id) @property - def display_name(self): + def display_name(self) -> str: """:class:`str`: Returns the user's display name. For regular users this is just their username, but @@ -168,7 +260,7 @@ class BaseUser(_UserTag): """ return self.name - def mentioned_in(self, message): + def mentioned_in(self, message: Message) -> bool: """Checks if the user is mentioned in the specified message. Parameters @@ -234,16 +326,22 @@ class ClientUser(BaseUser): __slots__ = ('locale', '_flags', 'verified', 'mfa_enabled', '__weakref__') - def __init__(self, *, state, data): + if TYPE_CHECKING: + verified: bool + locale: Optional[str] + mfa_enabled: bool + _flags: int + + def __init__(self, *, state: ConnectionState, data: UserPayload) -> None: super().__init__(state=state, data=data) - def __repr__(self): + def __repr__(self) -> str: return ( f'' ) - def _update(self, data): + def _update(self, data: UserPayload) -> None: super()._update(data) # There's actually an Optional[str] phone field as well but I won't use it self.verified = data.get('verified', False) @@ -251,7 +349,7 @@ class ClientUser(BaseUser): self._flags = data.get('flags', 0) self.mfa_enabled = data.get('mfa_enabled', False) - async def edit(self, *, username: str = MISSING, avatar: bytes = MISSING) -> None: + async def edit(self, *, username: str = MISSING, avatar: bytes = MISSING) -> ClientUser: """|coro| Edits the current profile of the client. @@ -265,6 +363,9 @@ class ClientUser(BaseUser): The only image formats supported for uploading is JPEG and PNG. + .. versionchanged:: 2.0 + The edit is no longer in-place, instead the newly edited client user is returned. + Parameters ----------- username: :class:`str` @@ -279,6 +380,11 @@ class ClientUser(BaseUser): Editing your profile failed. InvalidArgument Wrong image format passed for ``avatar``. + + Returns + --------- + :class:`ClientUser` + The newly edited client user. """ payload: Dict[str, Any] = {} if username is not MISSING: @@ -287,8 +393,8 @@ class ClientUser(BaseUser): if avatar is not MISSING: payload['avatar'] = _bytes_to_base64_data(avatar) - data = await self._state.http.edit_profile(payload) - self._update(data) + data: UserPayload = await self._state.http.edit_profile(payload) + return ClientUser(state=self._state, data=data) class User(BaseUser, discord.abc.Messageable): @@ -312,6 +418,10 @@ class User(BaseUser, discord.abc.Messageable): Returns the user's name with discriminator. + .. describe:: int(x) + + Returns the user's ID. + Attributes ----------- name: :class:`str` @@ -328,11 +438,11 @@ class User(BaseUser, discord.abc.Messageable): __slots__ = ('_stored',) - def __init__(self, *, state, data): + def __init__(self, *, state: ConnectionState, data: UserPayload) -> None: super().__init__(state=state, data=data) - self._stored = False + self._stored: bool = False - def __repr__(self): + def __repr__(self) -> str: return f'' def __del__(self) -> None: @@ -343,17 +453,17 @@ class User(BaseUser, discord.abc.Messageable): pass @classmethod - def _copy(cls, user): + def _copy(cls, user: User): self = super()._copy(user) - self._stored = getattr(user, '_stored', False) + self._stored = False return self - async def _get_channel(self): + async def _get_channel(self) -> DMChannel: ch = await self.create_dm() return ch @property - def dm_channel(self): + def dm_channel(self) -> Optional[DMChannel]: """Optional[:class:`DMChannel`]: Returns the channel associated with this user if it exists. If this returns ``None``, you can create a DM channel by calling the @@ -362,7 +472,7 @@ class User(BaseUser, discord.abc.Messageable): return self._state._get_private_channel_by_user(self.id) @property - def mutual_guilds(self): + def mutual_guilds(self) -> List[Guild]: """List[:class:`Guild`]: The guilds that the user shares with the client. .. note:: @@ -373,7 +483,7 @@ class User(BaseUser, discord.abc.Messageable): """ return [guild for guild in self._state._guilds.values() if guild.get_member(self.id)] - async def create_dm(self): + async def create_dm(self) -> DMChannel: """|coro| Creates a :class:`DMChannel` with this user. @@ -391,5 +501,5 @@ class User(BaseUser, discord.abc.Messageable): return found state = self._state - data = await state.http.start_private_message(self.id) + data: DMChannelPayload = await state.http.start_private_message(self.id) return state.add_dm_channel(data) diff --git a/discord/utils.py b/discord/utils.py index dac6f9da..4360b77a 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -120,6 +120,9 @@ class _cached_property: if TYPE_CHECKING: from functools import cached_property as cached_property + + from typing_extensions import ParamSpec + from .permissions import Permissions from .abc import Snowflake from .invite import Invite @@ -129,6 +132,8 @@ if TYPE_CHECKING: headers: Mapping[str, Any] + P = ParamSpec('P') + else: cached_property = _cached_property @@ -231,8 +236,8 @@ def parse_time(timestamp: Optional[str]) -> Optional[datetime.datetime]: return None -def copy_doc(original: Callable[..., Any]) -> Callable[[Callable[..., Any]], Callable[..., Any]]: - def decorator(overriden: Callable[..., Any]) -> Callable[..., Any]: +def copy_doc(original: Callable) -> Callable[[T], T]: + def decorator(overriden: T) -> T: overriden.__doc__ = original.__doc__ overriden.__signature__ = _signature(original) # type: ignore return overriden @@ -240,10 +245,10 @@ def copy_doc(original: Callable[..., Any]) -> Callable[[Callable[..., Any]], Cal return decorator -def deprecated(instead: Optional[str] = None) -> Callable[[Callable[..., T]], Callable[..., T]]: - def actual_decorator(func: Callable[..., T]) -> Callable[..., T]: +def deprecated(instead: Optional[str] = None) -> Callable[[Callable[P, T]], Callable[P, T]]: + def actual_decorator(func: Callable[P, T]) -> Callable[P, T]: @functools.wraps(func) - def decorated(*args, **kwargs) -> T: + def decorated(*args: P.args, **kwargs: P.kwargs) -> T: warnings.simplefilter('always', DeprecationWarning) # turn off filter if instead: fmt = "{0.__name__} is deprecated, use {1} instead." @@ -267,7 +272,7 @@ def oauth_url( redirect_uri: str = MISSING, scopes: Iterable[str] = MISSING, disable_guild_select: bool = False, -): +) -> str: """A helper function that returns the OAuth2 URL for inviting the bot into guilds. @@ -479,17 +484,17 @@ def _bytes_to_base64_data(data: bytes) -> str: if HAS_ORJSON: - def to_json(obj: Any) -> str: # type: ignore + def _to_json(obj: Any) -> str: # type: ignore return orjson.dumps(obj).decode('utf-8') - from_json = orjson.loads # type: ignore + _from_json = orjson.loads # type: ignore else: - def to_json(obj: Any) -> str: + def _to_json(obj: Any) -> str: return json.dumps(obj, separators=(',', ':'), ensure_ascii=True) - from_json = json.loads + _from_json = json.loads def _parse_ratelimit_header(request: Any, *, use_clock: bool = False) -> float: @@ -916,7 +921,7 @@ def evaluate_annotation( is_literal = False args = tp.__args__ if not hasattr(tp, '__origin__'): - if PY_310 and tp.__class__ is types.Union: # type: ignore + if PY_310 and tp.__class__ is types.UnionType: # type: ignore converted = Union[args] # type: ignore return evaluate_annotation(converted, globals, locals, cache) diff --git a/discord/voice_client.py b/discord/voice_client.py index 6816fa3e..d382a74d 100644 --- a/discord/voice_client.py +++ b/discord/voice_client.py @@ -84,7 +84,7 @@ __all__ = ( -log: logging.Logger = logging.getLogger(__name__) +_log = logging.getLogger(__name__) class VoiceProtocol: """A class that represents the Discord voice protocol. @@ -301,7 +301,7 @@ class VoiceClient(VoiceProtocol): async def on_voice_server_update(self, data: VoiceServerUpdatePayload) -> None: if self._voice_server_complete.is_set(): - log.info('Ignoring extraneous voice server update.') + _log.info('Ignoring extraneous voice server update.') return self.token = data.get('token') @@ -309,7 +309,7 @@ class VoiceClient(VoiceProtocol): endpoint = data.get('endpoint') if endpoint is None or self.token is None: - log.warning('Awaiting endpoint... This requires waiting. ' \ + _log.warning('Awaiting endpoint... This requires waiting. ' \ 'If timeout occurred considering raising the timeout and reconnecting.') return @@ -335,18 +335,18 @@ class VoiceClient(VoiceProtocol): await self.channel.guild.change_voice_state(channel=self.channel) async def voice_disconnect(self) -> None: - log.info('The voice handshake is being terminated for Channel ID %s (Guild ID %s)', self.channel.id, self.guild.id) + _log.info('The voice handshake is being terminated for Channel ID %s (Guild ID %s)', self.channel.id, self.guild.id) await self.channel.guild.change_voice_state(channel=None) def prepare_handshake(self) -> None: self._voice_state_complete.clear() self._voice_server_complete.clear() self._handshaking = True - log.info('Starting voice handshake... (connection attempt %d)', self._connections + 1) + _log.info('Starting voice handshake... (connection attempt %d)', self._connections + 1) self._connections += 1 def finish_handshake(self) -> None: - log.info('Voice handshake complete. Endpoint found %s', self.endpoint) + _log.info('Voice handshake complete. Endpoint found %s', self.endpoint) self._handshaking = False self._voice_server_complete.clear() self._voice_state_complete.clear() @@ -360,7 +360,7 @@ class VoiceClient(VoiceProtocol): return ws async def connect(self, *, reconnect: bool, timeout: float) ->None: - log.info('Connecting to voice...') + _log.info('Connecting to voice...') self.timeout = timeout for i in range(5): @@ -388,7 +388,7 @@ class VoiceClient(VoiceProtocol): break except (ConnectionClosed, asyncio.TimeoutError): if reconnect: - log.exception('Failed to connect to voice... Retrying...') + _log.exception('Failed to connect to voice... Retrying...') await asyncio.sleep(1 + i * 2.0) await self.voice_disconnect() continue @@ -453,14 +453,14 @@ class VoiceClient(VoiceProtocol): # 4014 - voice channel has been deleted. # 4015 - voice server has crashed if exc.code in (1000, 4015): - log.info('Disconnecting from voice normally, close code %d.', exc.code) + _log.info('Disconnecting from voice normally, close code %d.', exc.code) await self.disconnect() break if exc.code == 4014: - log.info('Disconnected from voice by force... potentially reconnecting.') + _log.info('Disconnected from voice by force... potentially reconnecting.') successful = await self.potential_reconnect() if not successful: - log.info('Reconnect was unsuccessful, disconnecting from voice normally...') + _log.info('Reconnect was unsuccessful, disconnecting from voice normally...') await self.disconnect() break else: @@ -471,7 +471,7 @@ class VoiceClient(VoiceProtocol): raise retry = backoff.delay() - log.exception('Disconnected from voice... Reconnecting in %.2fs.', retry) + _log.exception('Disconnected from voice... Reconnecting in %.2fs.', retry) self._connected.clear() await asyncio.sleep(retry) await self.voice_disconnect() @@ -479,7 +479,7 @@ class VoiceClient(VoiceProtocol): await self.connect(reconnect=True, timeout=self.timeout) except asyncio.TimeoutError: # at this point we've retried 5 times... let's continue the loop. - log.warning('Could not connect to voice... Retrying...') + _log.warning('Could not connect to voice... Retrying...') continue async def disconnect(self, *, force: bool = False) -> None: @@ -671,6 +671,6 @@ class VoiceClient(VoiceProtocol): try: self.socket.sendto(packet, (self.endpoint_ip, self.voice_port)) except BlockingIOError: - log.warning('A packet has been dropped (seq: %s, timestamp: %s)', self.sequence, self.timestamp) + _log.warning('A packet has been dropped (seq: %s, timestamp: %s)', self.sequence, self.timestamp) self.checked_add('timestamp', opus.Encoder.SAMPLES_PER_FRAME, 4294967295) diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index c5e93408..1aec6544 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -24,7 +24,6 @@ DEALINGS IN THE SOFTWARE. from __future__ import annotations -import contextvars import logging import asyncio import json @@ -32,6 +31,7 @@ import re from urllib.parse import quote as urlquote from typing import Any, Dict, List, Literal, NamedTuple, Optional, TYPE_CHECKING, Tuple, Union, overload +from contextvars import ContextVar import aiohttp @@ -43,7 +43,7 @@ from ..user import BaseUser, User from ..asset import Asset from ..http import Route from ..mixins import Hashable -from ..object import Object +from ..channel import PartialMessageable __all__ = ( 'Webhook', @@ -52,15 +52,20 @@ __all__ = ( 'PartialWebhookGuild', ) -log = logging.getLogger(__name__) +_log = logging.getLogger(__name__) if TYPE_CHECKING: from ..file import File from ..embeds import Embed from ..mentions import AllowedMentions + from ..state import ConnectionState + from ..http import Response from ..types.webhook import ( Webhook as WebhookPayload, ) + from ..types.message import ( + Message as MessagePayload, + ) from ..guild import Guild from ..channel import TextChannel from ..abc import Snowflake @@ -116,7 +121,7 @@ class AsyncWebhookAdapter: if payload is not None: headers['Content-Type'] = 'application/json' - to_send = utils.to_json(payload) + to_send = utils._to_json(payload) if auth_token is not None: headers['Authorization'] = f'Bot {auth_token}' @@ -143,7 +148,7 @@ class AsyncWebhookAdapter: try: async with session.request(method, url, data=to_send, headers=headers, params=params) as response: - log.debug( + _log.debug( 'Webhook ID %s with %s %s has returned status code %s', webhook_id, method, @@ -157,7 +162,7 @@ class AsyncWebhookAdapter: remaining = response.headers.get('X-Ratelimit-Remaining') if remaining == '0' and response.status != 429: delta = utils._parse_ratelimit_header(response) - log.debug( + _log.debug( 'Webhook ID %s has been pre-emptively rate limited, waiting %.2f seconds', webhook_id, delta ) lock.delay_by(delta) @@ -170,7 +175,7 @@ class AsyncWebhookAdapter: raise HTTPException(response, data) retry_after: float = data['retry_after'] # type: ignore - log.warning('Webhook ID %s is rate limited. Retrying in %.2f seconds', webhook_id, retry_after) + _log.warning('Webhook ID %s is rate limited. Retrying in %.2f seconds', webhook_id, retry_after) await asyncio.sleep(retry_after) continue @@ -205,7 +210,7 @@ class AsyncWebhookAdapter: token: Optional[str] = None, session: aiohttp.ClientSession, reason: Optional[str] = None, - ): + ) -> Response[None]: route = Route('DELETE', '/webhooks/{webhook_id}', webhook_id=webhook_id) return self.request(route, session, reason=reason, auth_token=token) @@ -216,7 +221,7 @@ class AsyncWebhookAdapter: *, session: aiohttp.ClientSession, reason: Optional[str] = None, - ): + ) -> Response[None]: route = Route('DELETE', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token) return self.request(route, session, reason=reason) @@ -228,7 +233,7 @@ class AsyncWebhookAdapter: *, session: aiohttp.ClientSession, reason: Optional[str] = None, - ): + ) -> Response[WebhookPayload]: route = Route('PATCH', '/webhooks/{webhook_id}', webhook_id=webhook_id) return self.request(route, session, reason=reason, payload=payload, auth_token=token) @@ -240,7 +245,7 @@ class AsyncWebhookAdapter: *, session: aiohttp.ClientSession, reason: Optional[str] = None, - ): + ) -> Response[WebhookPayload]: route = Route('PATCH', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token) return self.request(route, session, reason=reason, payload=payload) @@ -255,7 +260,7 @@ class AsyncWebhookAdapter: files: Optional[List[File]] = None, thread_id: Optional[int] = None, wait: bool = False, - ): + ) -> Response[Optional[MessagePayload]]: params = {'wait': int(wait)} if thread_id: params['thread_id'] = thread_id @@ -269,7 +274,7 @@ class AsyncWebhookAdapter: message_id: int, *, session: aiohttp.ClientSession, - ): + ) -> Response[MessagePayload]: route = Route( 'GET', '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}', @@ -289,7 +294,7 @@ class AsyncWebhookAdapter: payload: Optional[Dict[str, Any]] = None, multipart: Optional[List[Dict[str, Any]]] = None, files: Optional[List[File]] = None, - ): + ) -> Response[Message]: route = Route( 'PATCH', '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}', @@ -306,7 +311,7 @@ class AsyncWebhookAdapter: message_id: int, *, session: aiohttp.ClientSession, - ): + ) -> Response[None]: route = Route( 'DELETE', '/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}', @@ -322,7 +327,7 @@ class AsyncWebhookAdapter: token: str, *, session: aiohttp.ClientSession, - ): + ) -> Response[WebhookPayload]: route = Route('GET', '/webhooks/{webhook_id}', webhook_id=webhook_id) return self.request(route, session=session, auth_token=token) @@ -332,7 +337,7 @@ class AsyncWebhookAdapter: token: str, *, session: aiohttp.ClientSession, - ): + ) -> Response[WebhookPayload]: route = Route('GET', '/webhooks/{webhook_id}/{webhook_token}', webhook_id=webhook_id, webhook_token=token) return self.request(route, session=session) @@ -344,7 +349,7 @@ class AsyncWebhookAdapter: session: aiohttp.ClientSession, type: int, data: Optional[Dict[str, Any]] = None, - ): + ) -> Response[None]: payload: Dict[str, Any] = { 'type': type, } @@ -367,7 +372,7 @@ class AsyncWebhookAdapter: token: str, *, session: aiohttp.ClientSession, - ): + ) -> Response[MessagePayload]: r = Route( 'GET', '/webhooks/{webhook_id}/{webhook_token}/messages/@original', @@ -385,7 +390,7 @@ class AsyncWebhookAdapter: payload: Optional[Dict[str, Any]] = None, multipart: Optional[List[Dict[str, Any]]] = None, files: Optional[List[File]] = None, - ): + ) -> Response[MessagePayload]: r = Route( 'PATCH', '/webhooks/{webhook_id}/{webhook_token}/messages/@original', @@ -400,7 +405,7 @@ class AsyncWebhookAdapter: token: str, *, session: aiohttp.ClientSession, - ): + ) -> Response[None]: r = Route( 'DELETE', '/webhooks/{webhook_id}/{wehook_token}/messages/@original', @@ -420,7 +425,7 @@ def handle_message_parameters( content: Optional[str] = MISSING, *, username: str = MISSING, - avatar_url: str = MISSING, + avatar_url: Any = MISSING, tts: bool = False, ephemeral: bool = False, file: File = MISSING, @@ -481,7 +486,7 @@ def handle_message_parameters( files = [file] if files: - multipart.append({'name': 'payload_json', 'value': utils.to_json(payload)}) + multipart.append({'name': 'payload_json', 'value': utils._to_json(payload)}) payload = None if len(files) == 1: file = files[0] @@ -507,7 +512,7 @@ def handle_message_parameters( return ExecuteWebhookParameters(payload=payload, multipart=multipart, files=files) -async_context = contextvars.ContextVar('async_webhook_context', default=AsyncWebhookAdapter()) +async_context: ContextVar[AsyncWebhookAdapter] = ContextVar('async_webhook_context', default=AsyncWebhookAdapter()) class PartialWebhookChannel(Hashable): @@ -579,10 +584,11 @@ class _FriendlyHttpAttributeErrorHelper: class _WebhookState: __slots__ = ('_parent', '_webhook') - def __init__(self, webhook, parent): - self._webhook = webhook + def __init__(self, webhook: Any, parent: Optional[Union[ConnectionState, _WebhookState]]): + self._webhook: Any = webhook - if isinstance(parent, self.__class__): + self._parent: Optional[ConnectionState] + if isinstance(parent, _WebhookState): self._parent = None else: self._parent = parent @@ -595,7 +601,12 @@ class _WebhookState: def store_user(self, data): if self._parent is not None: return self._parent.store_user(data) - return BaseUser(state=self, data=data) + # state parameter is artificial + return BaseUser(state=self, data=data) # type: ignore + + def create_user(self, data): + # state parameter is artificial + return BaseUser(state=self, data=data) # type: ignore @property def http(self): @@ -636,13 +647,16 @@ class WebhookMessage(Message): files: List[File] = MISSING, view: Optional[View] = MISSING, allowed_mentions: Optional[AllowedMentions] = None, - ): + ) -> WebhookMessage: """|coro| Edits the message. .. versionadded:: 1.6 + .. versionchanged:: 2.0 + The edit is no longer in-place, instead the newly edited message is returned. + Parameters ------------ content: Optional[:class:`str`] @@ -682,8 +696,13 @@ class WebhookMessage(Message): The length of ``embeds`` was invalid InvalidArgument There was no token associated with this webhook. + + Returns + -------- + :class:`WebhookMessage` + The newly edited message. """ - await self._state._webhook.edit_message( + return await self._state._webhook.edit_message( self.id, content=content, embeds=embeds, @@ -745,9 +764,9 @@ class BaseWebhook(Hashable): '_state', ) - def __init__(self, data: WebhookPayload, token: Optional[str] = None, state=None): + def __init__(self, data: WebhookPayload, token: Optional[str] = None, state: Optional[ConnectionState] = None): self.auth_token: Optional[str] = token - self._state = state or _WebhookState(self, parent=state) + self._state: Union[ConnectionState, _WebhookState] = state or _WebhookState(self, parent=state) self._update(data) def _update(self, data: WebhookPayload): @@ -762,10 +781,8 @@ class BaseWebhook(Hashable): user = data.get('user') self.user: Optional[Union[BaseUser, User]] = None if user is not None: - if self._state is None: - self.user = BaseUser(state=None, data=user) - else: - self.user = User(state=self._state, data=user) + # state parameter may be _WebhookState + self.user = User(state=self._state, data=user) # type: ignore source_channel = data.get('source_channel') if source_channel: @@ -869,6 +886,10 @@ class Webhook(BaseWebhook): Returns the webhooks's hash. + .. describe:: int(x) + + Returns the webhooks's ID. + .. versionchanged:: 1.4 Webhooks are now comparable and hashable. @@ -916,12 +937,12 @@ class Webhook(BaseWebhook): return f'' @property - def url(self): + def url(self) -> str: """:class:`str` : Returns the webhook's url.""" return f'https://discord.com/api/webhooks/{self.id}/{self.token}' @classmethod - def partial(cls, id: int, token: str, *, session: aiohttp.ClientSession, bot_token: Optional[str] = None): + def partial(cls, id: int, token: str, *, session: aiohttp.ClientSession, bot_token: Optional[str] = None) -> Webhook: """Creates a partial :class:`Webhook`. Parameters @@ -957,7 +978,7 @@ class Webhook(BaseWebhook): return cls(data, session, token=bot_token) @classmethod - def from_url(cls, url: str, *, session: aiohttp.ClientSession, bot_token: Optional[str] = None): + def from_url(cls, url: str, *, session: aiohttp.ClientSession, bot_token: Optional[str] = None) -> Webhook: """Creates a partial :class:`Webhook` from a webhook URL. Parameters @@ -996,7 +1017,7 @@ class Webhook(BaseWebhook): return cls(data, session, token=bot_token) # type: ignore @classmethod - def _as_follower(cls, data, *, channel, user): + def _as_follower(cls, data, *, channel, user) -> Webhook: name = f"{channel.guild} #{channel}" feed: WebhookPayload = { 'id': data['webhook_id'], @@ -1012,7 +1033,7 @@ class Webhook(BaseWebhook): return cls(feed, session=session, state=state, token=state.http.token) @classmethod - def from_state(cls, data, state): + def from_state(cls, data, state) -> Webhook: session = state.http._HTTPClient__session return cls(data, session=session, state=state, token=state.http.token) @@ -1108,7 +1129,7 @@ class Webhook(BaseWebhook): avatar: Optional[bytes] = MISSING, channel: Optional[Snowflake] = None, prefer_auth: bool = True, - ): + ) -> Webhook: """|coro| Edits this Webhook. @@ -1155,6 +1176,7 @@ class Webhook(BaseWebhook): adapter = async_context.get() + data: Optional[WebhookPayload] = None # If a channel is given, always use the authenticated endpoint if channel is not None: if self.auth_token is None: @@ -1162,21 +1184,24 @@ class Webhook(BaseWebhook): payload['channel_id'] = channel.id data = await adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason) - self._update(data) - return if prefer_auth and self.auth_token: data = await adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason) - self._update(data) elif self.token: data = await adapter.edit_webhook_with_token( self.id, self.token, payload=payload, session=self.session, reason=reason ) - self._update(data) + + if data is None: + raise RuntimeError('Unreachable code hit: data was not assigned') + + return Webhook(data=data, session=self.session, token=self.auth_token, state=self._state) def _create_message(self, data): state = _WebhookState(self, parent=self._state) - channel = self.channel or Object(id=int(data['channel_id'])) + # state may be artificial (unlikely at this point...) + channel = self.channel or PartialMessageable(state=self._state, id=int(data['channel_id'])) # type: ignore + # state is artificial return WebhookMessage(data=data, state=state, channel=channel) # type: ignore @overload @@ -1185,7 +1210,7 @@ class Webhook(BaseWebhook): content: str = MISSING, *, username: str = MISSING, - avatar_url: str = MISSING, + avatar_url: Any = MISSING, tts: bool = MISSING, ephemeral: bool = MISSING, file: File = MISSING, @@ -1205,7 +1230,7 @@ class Webhook(BaseWebhook): content: str = MISSING, *, username: str = MISSING, - avatar_url: str = MISSING, + avatar_url: Any = MISSING, tts: bool = MISSING, ephemeral: bool = MISSING, file: File = MISSING, @@ -1224,7 +1249,7 @@ class Webhook(BaseWebhook): content: str = MISSING, *, username: str = MISSING, - avatar_url: str = MISSING, + avatar_url: Any = MISSING, tts: bool = False, ephemeral: bool = False, file: File = MISSING, @@ -1261,9 +1286,10 @@ class Webhook(BaseWebhook): username: :class:`str` The username to send with this message. If no username is provided then the default username for the webhook is used. - avatar_url: Union[:class:`str`, :class:`Asset`] + avatar_url: :class:`str` The avatar URL to send with this message. If no avatar URL is provided - then the default avatar for the webhook is used. + then the default avatar for the webhook is used. If this is not a + string then it is explicitly cast using ``str``. tts: :class:`bool` Indicates if the message should be sent using text-to-speech. ephemeral: :class:`bool` @@ -1435,7 +1461,7 @@ class Webhook(BaseWebhook): files: List[File] = MISSING, view: Optional[View] = MISSING, allowed_mentions: Optional[AllowedMentions] = None, - ): + ) -> WebhookMessage: """|coro| Edits a message owned by this webhook. @@ -1445,6 +1471,9 @@ class Webhook(BaseWebhook): .. versionadded:: 1.6 + .. versionchanged:: 2.0 + The edit is no longer in-place, instead the newly edited message is returned. + Parameters ------------ message_id: :class:`int` @@ -1488,6 +1517,11 @@ class Webhook(BaseWebhook): InvalidArgument There was no token associated with this webhook or the webhook had no state. + + Returns + -------- + :class:`WebhookMessage` + The newly edited webhook message. """ if self.token is None: @@ -1511,7 +1545,7 @@ class Webhook(BaseWebhook): previous_allowed_mentions=previous_mentions, ) adapter = async_context.get() - await adapter.edit_webhook_message( + data = await adapter.edit_webhook_message( self.id, self.token, message_id, @@ -1521,10 +1555,12 @@ class Webhook(BaseWebhook): files=params.files, ) + message = self._create_message(data) if view and not view.is_finished(): self._state.store_view(view, message_id) + return message - async def delete_message(self, message_id: int): + async def delete_message(self, message_id: int, /) -> None: """|coro| Deletes a message owned by this webhook. diff --git a/discord/webhook/sync.py b/discord/webhook/sync.py index 021c0ef9..62fb2d5f 100644 --- a/discord/webhook/sync.py +++ b/discord/webhook/sync.py @@ -43,7 +43,7 @@ from .. import utils from ..errors import InvalidArgument, HTTPException, Forbidden, NotFound, DiscordServerError from ..message import Message from ..http import Route -from ..object import Object +from ..channel import PartialMessageable from .async_ import BaseWebhook, handle_message_parameters, _WebhookState @@ -52,7 +52,7 @@ __all__ = ( 'SyncWebhookMessage', ) -log = logging.getLogger(__name__) +_log = logging.getLogger(__name__) if TYPE_CHECKING: from ..file import File @@ -117,7 +117,7 @@ class WebhookAdapter: if payload is not None: headers['Content-Type'] = 'application/json' - to_send = utils.to_json(payload) + to_send = utils._to_json(payload) if auth_token is not None: headers['Authorization'] = f'Bot {auth_token}' @@ -142,13 +142,15 @@ class WebhookAdapter: for p in multipart: name = p['name'] if name == 'payload_json': - to_send = { 'payload_json': p['value'] } + to_send = {'payload_json': p['value']} else: file_data[name] = (p['filename'], p['value'], p['content_type']) try: - with session.request(method, url, data=to_send, files=file_data, headers=headers, params=params) as response: - log.debug( + with session.request( + method, url, data=to_send, files=file_data, headers=headers, params=params + ) as response: + _log.debug( 'Webhook ID %s with %s %s has returned status code %s', webhook_id, method, @@ -166,7 +168,7 @@ class WebhookAdapter: remaining = response.headers.get('X-Ratelimit-Remaining') if remaining == '0' and response.status_code != 429: delta = utils._parse_ratelimit_header(response) - log.debug( + _log.debug( 'Webhook ID %s has been pre-emptively rate limited, waiting %.2f seconds', webhook_id, delta ) lock.delay_by(delta) @@ -179,7 +181,7 @@ class WebhookAdapter: raise HTTPException(response, data) retry_after: float = data['retry_after'] # type: ignore - log.warning('Webhook ID %s is rate limited. Retrying in %.2f seconds', webhook_id, retry_after) + _log.warning('Webhook ID %s is rate limited. Retrying in %.2f seconds', webhook_id, retry_after) time.sleep(retry_after) continue @@ -346,8 +348,17 @@ class WebhookAdapter: return self.request(route, session=session) -_context = threading.local() -_context.adapter = WebhookAdapter() +class _WebhookContext(threading.local): + adapter: Optional[WebhookAdapter] = None + + +_context = _WebhookContext() + + +def _get_webhook_adapter() -> WebhookAdapter: + if _context.adapter is None: + _context.adapter = WebhookAdapter() + return _context.adapter class SyncWebhookMessage(Message): @@ -362,6 +373,8 @@ class SyncWebhookMessage(Message): .. versionadded:: 2.0 """ + _state: _WebhookState + def edit( self, content: Optional[str] = MISSING, @@ -370,7 +383,7 @@ class SyncWebhookMessage(Message): file: File = MISSING, files: List[File] = MISSING, allowed_mentions: Optional[AllowedMentions] = None, - ): + ) -> SyncWebhookMessage: """Edits the message. Parameters @@ -403,8 +416,13 @@ class SyncWebhookMessage(Message): The length of ``embeds`` was invalid InvalidArgument There was no token associated with this webhook. + + Returns + -------- + :class:`SyncWebhookMessage` + The newly edited message. """ - self._state._webhook.edit_message( + return self._state._webhook.edit_message( self.id, content=content, embeds=embeds, @@ -457,6 +475,10 @@ class SyncWebhook(BaseWebhook): Returns the webhooks's hash. + .. describe:: int(x) + + Returns the webhooks's ID. + .. versionchanged:: 1.4 Webhooks are now comparable and hashable. @@ -504,12 +526,12 @@ class SyncWebhook(BaseWebhook): return f'' @property - def url(self): + def url(self) -> str: """:class:`str` : Returns the webhook's url.""" return f'https://discord.com/api/webhooks/{self.id}/{self.token}' @classmethod - def partial(cls, id: int, token: str, *, session: Session = MISSING, bot_token: Optional[str] = None): + def partial(cls, id: int, token: str, *, session: Session = MISSING, bot_token: Optional[str] = None) -> SyncWebhook: """Creates a partial :class:`Webhook`. Parameters @@ -548,7 +570,7 @@ class SyncWebhook(BaseWebhook): return cls(data, session, token=bot_token) @classmethod - def from_url(cls, url: str, *, session: Session = MISSING, bot_token: Optional[str] = None): + def from_url(cls, url: str, *, session: Session = MISSING, bot_token: Optional[str] = None) -> SyncWebhook: """Creates a partial :class:`Webhook` from a webhook URL. Parameters @@ -621,7 +643,7 @@ class SyncWebhook(BaseWebhook): :class:`SyncWebhook` The fetched webhook. """ - adapter: WebhookAdapter = _context.adapter + adapter: WebhookAdapter = _get_webhook_adapter() if prefer_auth and self.auth_token: data = adapter.fetch_webhook(self.id, self.auth_token, session=self.session) @@ -632,7 +654,7 @@ class SyncWebhook(BaseWebhook): return SyncWebhook(data, self.session, token=self.auth_token, state=self._state) - def delete(self, *, reason: Optional[str] = None, prefer_auth: bool = True): + def delete(self, *, reason: Optional[str] = None, prefer_auth: bool = True) -> None: """Deletes this Webhook. Parameters @@ -659,7 +681,7 @@ class SyncWebhook(BaseWebhook): if self.token is None and self.auth_token is None: raise InvalidArgument('This webhook does not have a token associated with it') - adapter: WebhookAdapter = _context.adapter + adapter: WebhookAdapter = _get_webhook_adapter() if prefer_auth and self.auth_token: adapter.delete_webhook(self.id, token=self.auth_token, session=self.session, reason=reason) @@ -674,7 +696,7 @@ class SyncWebhook(BaseWebhook): avatar: Optional[bytes] = MISSING, channel: Optional[Snowflake] = None, prefer_auth: bool = True, - ): + ) -> SyncWebhook: """Edits this Webhook. Parameters @@ -702,6 +724,11 @@ class SyncWebhook(BaseWebhook): InvalidArgument This webhook does not have a token associated with it or it tried editing a channel without authentication. + + Returns + -------- + :class:`SyncWebhook` + The newly edited webhook. """ if self.token is None and self.auth_token is None: raise InvalidArgument('This webhook does not have a token associated with it') @@ -713,8 +740,9 @@ class SyncWebhook(BaseWebhook): if avatar is not MISSING: payload['avatar'] = utils._bytes_to_base64_data(avatar) if avatar is not None else None - adapter: WebhookAdapter = _context.adapter + adapter: WebhookAdapter = _get_webhook_adapter() + data: Optional[WebhookPayload] = None # If a channel is given, always use the authenticated endpoint if channel is not None: if self.auth_token is None: @@ -722,20 +750,23 @@ class SyncWebhook(BaseWebhook): payload['channel_id'] = channel.id data = adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason) - self._update(data) - return if prefer_auth and self.auth_token: data = adapter.edit_webhook(self.id, self.auth_token, payload=payload, session=self.session, reason=reason) - self._update(data) elif self.token: data = adapter.edit_webhook_with_token(self.id, self.token, payload=payload, session=self.session, reason=reason) - self._update(data) + + if data is None: + raise RuntimeError('Unreachable code hit: data was not assigned') + + return SyncWebhook(data=data, session=self.session, token=self.auth_token, state=self._state) def _create_message(self, data): state = _WebhookState(self, parent=self._state) - channel = self.channel or Object(id=int(data['channel_id'])) - return SyncWebhookMessage(data=data, state=state, channel=channel) + # state may be artificial (unlikely at this point...) + channel = self.channel or PartialMessageable(state=self._state, id=int(data['channel_id'])) # type: ignore + # state is artificial + return SyncWebhookMessage(data=data, state=state, channel=channel) # type: ignore @overload def send( @@ -743,7 +774,7 @@ class SyncWebhook(BaseWebhook): content: str = MISSING, *, username: str = MISSING, - avatar_url: str = MISSING, + avatar_url: Any = MISSING, tts: bool = MISSING, file: File = MISSING, files: List[File] = MISSING, @@ -760,7 +791,7 @@ class SyncWebhook(BaseWebhook): content: str = MISSING, *, username: str = MISSING, - avatar_url: str = MISSING, + avatar_url: Any = MISSING, tts: bool = MISSING, file: File = MISSING, files: List[File] = MISSING, @@ -776,7 +807,7 @@ class SyncWebhook(BaseWebhook): content: str = MISSING, *, username: str = MISSING, - avatar_url: str = MISSING, + avatar_url: Any = MISSING, tts: bool = False, file: File = MISSING, files: List[File] = MISSING, @@ -808,9 +839,10 @@ class SyncWebhook(BaseWebhook): username: :class:`str` The username to send with this message. If no username is provided then the default username for the webhook is used. - avatar_url: Union[:class:`str`, :class:`Asset`] + avatar_url: :class:`str` The avatar URL to send with this message. If no avatar URL is provided - then the default avatar for the webhook is used. + then the default avatar for the webhook is used. If this is not a + string then it is explicitly cast using ``str``. tts: :class:`bool` Indicates if the message should be sent using text-to-speech. file: :class:`File` @@ -873,7 +905,7 @@ class SyncWebhook(BaseWebhook): allowed_mentions=allowed_mentions, previous_allowed_mentions=previous_mentions, ) - adapter: WebhookAdapter = _context.adapter + adapter: WebhookAdapter = _get_webhook_adapter() thread_id: Optional[int] = None if thread is not MISSING: thread_id = thread.id @@ -891,7 +923,7 @@ class SyncWebhook(BaseWebhook): if wait: return self._create_message(data) - def fetch_message(self, id: int) -> SyncWebhookMessage: + def fetch_message(self, id: int, /) -> SyncWebhookMessage: """Retrieves a single :class:`~discord.SyncWebhookMessage` owned by this webhook. .. versionadded:: 2.0 @@ -921,7 +953,7 @@ class SyncWebhook(BaseWebhook): if self.token is None: raise InvalidArgument('This webhook does not have a token associated with it') - adapter: WebhookAdapter = _context.adapter + adapter: WebhookAdapter = _get_webhook_adapter() data = adapter.get_webhook_message( self.id, self.token, @@ -940,7 +972,7 @@ class SyncWebhook(BaseWebhook): file: File = MISSING, files: List[File] = MISSING, allowed_mentions: Optional[AllowedMentions] = None, - ): + ) -> SyncWebhookMessage: """Edits a message owned by this webhook. This is a lower level interface to :meth:`WebhookMessage.edit` in case @@ -995,8 +1027,8 @@ class SyncWebhook(BaseWebhook): allowed_mentions=allowed_mentions, previous_allowed_mentions=previous_mentions, ) - adapter: WebhookAdapter = _context.adapter - adapter.edit_webhook_message( + adapter: WebhookAdapter = _get_webhook_adapter() + data = adapter.edit_webhook_message( self.id, self.token, message_id, @@ -1005,8 +1037,9 @@ class SyncWebhook(BaseWebhook): multipart=params.multipart, files=params.files, ) + return self._create_message(data) - def delete_message(self, message_id: int): + def delete_message(self, message_id: int, /) -> None: """Deletes a message owned by this webhook. This is a lower level interface to :meth:`WebhookMessage.delete` in case @@ -1029,7 +1062,7 @@ class SyncWebhook(BaseWebhook): if self.token is None: raise InvalidArgument('This webhook does not have a token associated with it') - adapter: WebhookAdapter = _context.adapter + adapter: WebhookAdapter = _get_webhook_adapter() adapter.delete_webhook_message( self.id, self.token, diff --git a/docs/api.rst b/docs/api.rst index 9724957d..393c2fa2 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -101,6 +101,7 @@ VoiceClient .. autoclass:: VoiceClient() :members: + :exclude-members: connect, on_voice_state_update, on_voice_server_update VoiceProtocol ~~~~~~~~~~~~~~~ @@ -297,24 +298,36 @@ to handle it, which defaults to print a traceback and ignoring the exception. :param kwargs: The keyword arguments for the event that raised the exception. +.. function:: on_socket_event_type(event_type) + + Called whenever a websocket event is received from the WebSocket. + + This is mainly useful for logging how many events you are receiving + from the Discord gateway. + + .. versionadded:: 2.0 + + :param event_type: The event type from Discord that is received, e.g. ``'READY'``. + :type event_type: :class:`str` + .. function:: on_socket_raw_receive(msg) - Called whenever a message is received from the WebSocket, before - it's processed. This event is always dispatched when a message is - received and the passed data is not processed in any way. + 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. This is only really useful for grabbing the WebSocket stream and debugging purposes. + This requires setting the ``enable_debug_events`` setting in the :class:`Client`. + .. note:: This is only for the messages received from the client WebSocket. The voice WebSocket will not trigger this event. :param msg: The message passed in from the WebSocket library. - Could be :class:`bytes` for a binary message or :class:`str` - for a regular message. - :type msg: Union[:class:`bytes`, :class:`str`] + :type msg: :class:`str` .. function:: on_socket_raw_send(payload) @@ -325,6 +338,8 @@ to handle it, which defaults to print a traceback and ignoring the exception. This is only really useful for grabbing the WebSocket stream and debugging purposes. + This requires setting the ``enable_debug_events`` setting in the :class:`Client`. + .. note:: This is only for the messages sent from the client @@ -739,6 +754,8 @@ to handle it, which defaults to print a traceback and ignoring the exception. This requires :attr:`Intents.members` to be enabled. + .. versionadded:: 2.0 + :param member: The member who joined or left. :type member: :class:`ThreadMember` @@ -942,7 +959,7 @@ to handle it, which defaults to print a traceback and ignoring the exception. Called when a :class:`Guild` adds or removes :class:`Emoji`. - This requires :attr:`Intents.emojis` to be enabled. + This requires :attr:`Intents.emojis_and_stickers` to be enabled. :param guild: The guild who got their emojis updated. :type guild: :class:`Guild` @@ -951,6 +968,21 @@ to handle it, which defaults to print a traceback and ignoring the exception. :param after: A list of emojis after the update. :type after: Sequence[:class:`Emoji`] +.. function:: on_guild_stickers_update(guild, before, after) + + Called when a :class:`Guild` updates its stickers. + + This requires :attr:`Intents.emojis_and_stickers` to be enabled. + + .. versionadded:: 2.0 + + :param guild: The guild who got their stickers updated. + :type guild: :class:`Guild` + :param before: A list of stickers before the update. + :type before: Sequence[:class:`GuildSticker`] + :param after: A list of stickers after the update. + :type after: Sequence[:class:`GuildSticker`] + .. function:: on_guild_available(guild) on_guild_unavailable(guild) @@ -1574,6 +1606,8 @@ of :class:`enum.Enum`. .. container:: operations + .. versionadded:: 2.0 + .. describe:: x == y Checks if two verification levels are equal. @@ -1616,6 +1650,29 @@ of :class:`enum.Enum`. Specifies whether a :class:`Guild` has notifications on for all messages or mentions only by default. + .. container:: operations + + .. versionadded:: 2.0 + + .. describe:: x == y + + Checks if two notification levels are equal. + .. describe:: x != y + + Checks if two notification levels are not equal. + .. describe:: x > y + + Checks if a notification level is higher than another. + .. describe:: x < y + + Checks if a notification level is lower than another. + .. describe:: x >= y + + Checks if a notification level is higher or equal to another. + .. describe:: x <= y + + Checks if a notification level is lower or equal to another. + .. attribute:: all_messages Members receive notifications for every message regardless of them being mentioned. @@ -1631,6 +1688,8 @@ of :class:`enum.Enum`. .. container:: operations + .. versionadded:: 2.0 + .. describe:: x == y Checks if two content filter levels are equal. @@ -1761,6 +1820,7 @@ of :class:`enum.Enum`. - :attr:`~AuditLogDiff.bitrate` - :attr:`~AuditLogDiff.rtc_region` - :attr:`~AuditLogDiff.video_quality_mode` + - :attr:`~AuditLogDiff.default_auto_archive_duration` .. attribute:: channel_delete @@ -1890,7 +1950,7 @@ of :class:`enum.Enum`. .. attribute:: member_role_update A member's role has been updated. This triggers when a member - either gains a role or losses a role. + either gains a role or loses a role. When this is the action, the type of :attr:`~AuditLogEntry.target` is the :class:`Member` or :class:`User` who got the role. @@ -2189,8 +2249,8 @@ of :class:`enum.Enum`. A stage instance was started. When this is the action, the type of :attr:`~AuditLogEntry.target` is - either :class:`Object` with the stage instance ID of the stage instance - which was created. + the :class:`StageInstance` or :class:`Object` with the ID of the stage + instance which was created. Possible attributes for :class:`AuditLogDiff`: @@ -2204,8 +2264,8 @@ of :class:`enum.Enum`. A stage instance was updated. When this is the action, the type of :attr:`~AuditLogEntry.target` is - either :class:`Object` with the stage instance ID of the stage instance - which was updated. + the :class:`StageInstance` or :class:`Object` with the ID of the stage + instance which was updated. Possible attributes for :class:`AuditLogDiff`: @@ -2220,6 +2280,114 @@ of :class:`enum.Enum`. .. versionadded:: 2.0 + .. attribute:: sticker_create + + A sticker was created. + + 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. + + Possible attributes for :class:`AuditLogDiff`: + + - :attr:`~AuditLogDiff.name` + - :attr:`~AuditLogDiff.emoji` + - :attr:`~AuditLogDiff.type` + - :attr:`~AuditLogDiff.format_type` + - :attr:`~AuditLogDiff.description` + - :attr:`~AuditLogDiff.available` + + .. versionadded:: 2.0 + + .. attribute:: sticker_update + + A sticker was updated. + + 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. + + Possible attributes for :class:`AuditLogDiff`: + + - :attr:`~AuditLogDiff.name` + - :attr:`~AuditLogDiff.emoji` + - :attr:`~AuditLogDiff.type` + - :attr:`~AuditLogDiff.format_type` + - :attr:`~AuditLogDiff.description` + - :attr:`~AuditLogDiff.available` + + .. versionadded:: 2.0 + + .. attribute:: sticker_delete + + A sticker was deleted. + + 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. + + Possible attributes for :class:`AuditLogDiff`: + + - :attr:`~AuditLogDiff.name` + - :attr:`~AuditLogDiff.emoji` + - :attr:`~AuditLogDiff.type` + - :attr:`~AuditLogDiff.format_type` + - :attr:`~AuditLogDiff.description` + - :attr:`~AuditLogDiff.available` + + .. versionadded:: 2.0 + + .. attribute:: thread_create + + A thread was created. + + 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. + + Possible attributes for :class:`AuditLogDiff`: + + - :attr:`~AuditLogDiff.name` + - :attr:`~AuditLogDiff.archived` + - :attr:`~AuditLogDiff.locked` + - :attr:`~AuditLogDiff.auto_archive_duration` + + .. versionadded:: 2.0 + + .. attribute:: thread_update + + A thread was updated. + + 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. + + Possible attributes for :class:`AuditLogDiff`: + + - :attr:`~AuditLogDiff.name` + - :attr:`~AuditLogDiff.archived` + - :attr:`~AuditLogDiff.locked` + - :attr:`~AuditLogDiff.auto_archive_duration` + + .. versionadded:: 2.0 + + .. attribute:: thread_delete + + A thread was deleted. + + 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. + + Possible attributes for :class:`AuditLogDiff`: + + - :attr:`~AuditLogDiff.name` + - :attr:`~AuditLogDiff.archived` + - :attr:`~AuditLogDiff.locked` + - :attr:`~AuditLogDiff.auto_archive_duration` + + .. versionadded:: 2.0 + .. class:: AuditLogActionCategory Represents the category that the :class:`AuditLogAction` belongs to. @@ -2320,6 +2488,20 @@ of :class:`enum.Enum`. .. class:: StickerType + Represents the type of sticker. + + .. versionadded:: 2.0 + + .. attribute:: standard + + Represents a standard sticker that all Nitro users can use. + + .. attribute:: guild + + Represents a custom sticker created in a guild. + +.. class:: StickerFormatType + Represents the type of sticker images. .. versionadded:: 1.6 @@ -2392,6 +2574,27 @@ of :class:`enum.Enum`. .. versionadded:: 2.0 + .. container:: operations + + .. describe:: x == y + + Checks if two NSFW levels are equal. + .. describe:: x != y + + Checks if two NSFW levels are not equal. + .. describe:: x > y + + Checks if a NSFW level is higher than another. + .. describe:: x < y + + Checks if a NSFW level is lower than another. + .. describe:: x >= y + + Checks if a NSFW level is higher or equal to another. + .. describe:: x <= y + + Checks if a NSFW level is lower or equal to another. + .. attribute:: default The guild has not been categorised yet. @@ -2789,15 +2992,9 @@ AuditLogDiff .. attribute:: type - The type of channel or channel permission overwrite. + The type of channel or sticker. - If the type is an :class:`int`, then it is a type of channel which can be either - ``0`` to indicate a text channel or ``1`` to indicate a voice channel. - - If the type is a :class:`str`, then it is a type of permission overwrite which - can be either ``'role'`` or ``'member'``. - - :type: Union[:class:`int`, :class:`str`] + :type: Union[:class:`ChannelType`, :class:`StickerType`] .. attribute:: topic @@ -3004,6 +3201,64 @@ AuditLogDiff :type: :class:`VideoQualityMode` + .. attribute:: format_type + + The format type of a sticker being changed. + + See also :attr:`GuildSticker.format` + + :type: :class:`StickerFormatType` + + .. attribute:: emoji + + The name of the emoji that represents a sticker being changed. + + See also :attr:`GuildSticker.emoji` + + :type: :class:`str` + + .. attribute:: description + + The description of a sticker being changed. + + See also :attr:`GuildSticker.description` + + :type: :class:`str` + + .. attribute:: available + + The availability of a sticker being changed. + + See also :attr:`GuildSticker.available` + + :type: :class:`bool` + + .. attribute:: archived + + The thread is now archived. + + :type: :class:`bool` + + .. attribute:: locked + + The thread is being locked or unlocked. + + :type: :class:`bool` + + .. attribute:: auto_archive_duration + + The thread's auto archive duration being changed. + + See also :attr:`Thread.auto_archive_duration` + + :type: :class:`int` + + .. attribute:: default_auto_archive_duration + + The default auto archive duration for newly created threads being changed. + + :type: :class:`int` + .. this is currently missing the following keys: reason and application_id I'm not sure how to about porting these @@ -3384,6 +3639,15 @@ RoleTags .. autoclass:: RoleTags() :members: +PartialMessageable +~~~~~~~~~~~~~~~~~~~~ + +.. attributetable:: PartialMessageable + +.. autoclass:: PartialMessageable() + :members: + :inherited-members: + TextChannel ~~~~~~~~~~~~ @@ -3558,6 +3822,22 @@ Widget .. autoclass:: Widget() :members: +StickerPack +~~~~~~~~~~~~~ + +.. attributetable:: StickerPack + +.. autoclass:: StickerPack() + :members: + +StickerItem +~~~~~~~~~~~~~ + +.. attributetable:: StickerItem + +.. autoclass:: StickerItem() + :members: + Sticker ~~~~~~~~~~~~~~~ @@ -3566,6 +3846,22 @@ Sticker .. autoclass:: Sticker() :members: +StandardSticker +~~~~~~~~~~~~~~~~ + +.. attributetable:: StandardSticker + +.. autoclass:: StandardSticker() + :members: + +GuildSticker +~~~~~~~~~~~~~ + +.. attributetable:: GuildSticker + +.. autoclass:: GuildSticker() + :members: + RawMessageDeleteEvent ~~~~~~~~~~~~~~~~~~~~~~~ @@ -3659,7 +3955,7 @@ most of these yourself, even if they can also be used to hold attributes. Nearly all classes here have :ref:`py:slots` defined which means that it is impossible to have dynamic attributes to the data classes. -The only exception to this rule is :class:`abc.Snowflake`, which is made with +The only exception to this rule is :class:`Object`, which is made with dynamic attributes in mind. diff --git a/docs/ext/commands/api.rst b/docs/ext/commands/api.rst index 437e894a..e9631514 100644 --- a/docs/ext/commands/api.rst +++ b/docs/ext/commands/api.rst @@ -304,6 +304,9 @@ Checks .. autofunction:: discord.ext.commands.cooldown(rate, per, type=discord.ext.commands.BucketType.default) :decorator: +.. autofunction:: discord.ext.commands.dynamic_cooldown(cooldown, type=BucketType.default) + :decorator: + .. autofunction:: discord.ext.commands.max_concurrency(number, per=discord.ext.commands.BucketType.default, *, wait=False) :decorator: @@ -327,6 +330,14 @@ Checks .. _ext_commands_api_context: +Cooldown +--------- + +.. attributetable:: discord.ext.commands.Cooldown + +.. autoclass:: discord.ext.commands.Cooldown + :members: + Context -------- @@ -408,6 +419,9 @@ Converters .. autoclass:: discord.ext.commands.ThreadConverter :members: +.. autoclass:: discord.ext.commands.GuildStickerConverter + :members: + .. autoclass:: discord.ext.commands.clean_content :members: @@ -533,6 +547,9 @@ Exceptions .. autoexception:: discord.ext.commands.PartialEmojiConversionFailure :members: +.. autoexception:: discord.ext.commands.GuildStickerNotFound + :members: + .. autoexception:: discord.ext.commands.BadBoolArgument :members: @@ -608,6 +625,7 @@ Exception Hierarchy - :exc:`~.commands.BadArgument` - :exc:`~.commands.MessageNotFound` - :exc:`~.commands.MemberNotFound` + - :exc:`~.commands.GuildNotFound` - :exc:`~.commands.UserNotFound` - :exc:`~.commands.ChannelNotFound` - :exc:`~.commands.ChannelNotReadable` @@ -615,6 +633,7 @@ Exception Hierarchy - :exc:`~.commands.RoleNotFound` - :exc:`~.commands.BadInviteArgument` - :exc:`~.commands.EmojiNotFound` + - :exc:`~.commands.GuildStickerNotFound` - :exc:`~.commands.PartialEmojiConversionFailure` - :exc:`~.commands.BadBoolArgument` - :exc:`~.commands.ThreadNotFound` diff --git a/docs/index.rst b/docs/index.rst index a6f16c81..e1af5163 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -16,7 +16,6 @@ for Discord. - Modern Pythonic API using ``async``\/``await`` syntax - Sane rate limit handling that prevents 429s -- Implements the entire Discord API - Command extension to aid with bot creation - Easy to use with an object oriented design - Optimised for both speed and memory diff --git a/docs/locale/ja/LC_MESSAGES/api.po b/docs/locale/ja/LC_MESSAGES/api.po deleted file mode 100644 index 301ab2b5..00000000 --- a/docs/locale/ja/LC_MESSAGES/api.po +++ /dev/null @@ -1,19686 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../api.rst:4 -msgid "API Reference" -msgstr "APIリファレンス" - -#: ../../api.rst:6 -msgid "The following section outlines the API of discord.py." -msgstr "ここではdiscord.pyのAPIについて解説します。" - -#: ../../api.rst:10 -msgid "" -"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." -msgstr "" -"このモジュールはPythonのloggingモジュールを使用して、出力に依存しない方法でエラーや診断の内容を記録します。loggingモジュールが設定されていない場合、これらのログはどこにも出力されません。discord.pyでloggingモジュールを使用する方法の詳細は" -" :ref:`logging_setup` を参照してください。" - -#: ../../api.rst:17 -msgid "Version Related Info" -msgstr "バージョン関連情報" - -#: ../../api.rst:19 -msgid "" -"There are two main ways to query version information about the library. " -"For guarantees, check :ref:`version_guarantees`." -msgstr "" -"ライブラリに関するバージョン情報を問い合わせる方法は主に二つあります。保証については :ref:`version_guarantees` " -"を参照してください。" - -#: ../../api.rst:23 -msgid "A named tuple that is similar to :obj:`py:sys.version_info`." -msgstr ":obj:`py:sys.version_info` に似た名前付きタプル。" - -#: ../../api.rst:25 -msgid "" -"Just like :obj:`py:sys.version_info` the valid values for " -"``releaselevel`` are 'alpha', 'beta', 'candidate' and 'final'." -msgstr "" -":obj:`py:sys.version_info` と同じように ``releaselevel`` の有効値は " -"'alpha'、'beta'、'candidate'、そして 'final' です。" - -#: ../../api.rst:30 -msgid "" -"A string representation of the version. e.g. ``'1.0.0rc1'``. This is " -"based off of :pep:`440`." -msgstr "``'1.0.0rc1'`` のようなバージョンの文字列表現。これは :pep:`440` に基づいています。" - -#: ../../api.rst:34 -msgid "Client" -msgstr "クライアント" - -#: discord.Client:1 of -msgid "" -"Represents a client connection that connects to Discord. This class is " -"used to interact with the Discord WebSocket and API." -msgstr "Discordに接続するクライアント接続を表します。このクラスは、DiscordのWebSocket、及びAPIとの対話に使用されます。" - -#: discord.Client:4 of -msgid "A number of options can be passed to the :class:`Client`." -msgstr "多くのオプションを :class:`Client` に渡すことが可能です。" - -#: ../../api.rst discord.Asset.save discord.AsyncWebhookAdapter -#: discord.AsyncWebhookAdapter.handle_execution_response -#: discord.AsyncWebhookAdapter.request discord.Attachment.read -#: discord.Attachment.save discord.Attachment.to_file -#: discord.AutoShardedClient.change_presence discord.AutoShardedClient.connect -#: discord.AutoShardedClient.request_offline_members -#: discord.CategoryChannel.clone discord.CategoryChannel.create_invite -#: discord.CategoryChannel.delete discord.CategoryChannel.edit -#: discord.CategoryChannel.overwrites_for -#: discord.CategoryChannel.permissions_for -#: discord.CategoryChannel.set_permissions discord.Client -#: discord.Client.before_identify_hook discord.Client.change_presence -#: discord.Client.connect discord.Client.create_guild -#: discord.Client.delete_invite discord.Client.fetch_guild -#: discord.Client.fetch_guilds discord.Client.fetch_invite -#: discord.Client.fetch_template discord.Client.fetch_user -#: discord.Client.fetch_user_profile discord.Client.fetch_widget -#: discord.Client.get_channel discord.Client.get_emoji discord.Client.get_guild -#: discord.Client.get_user discord.Client.login -#: discord.Client.request_offline_members discord.Client.wait_for -#: discord.ClientUser.avatar_url_as discord.ClientUser.create_group -#: discord.ClientUser.edit discord.ClientUser.edit_settings -#: discord.ClientUser.get_relationship discord.ClientUser.mentioned_in -#: discord.ClientUser.permissions_in discord.DMChannel.fetch_message -#: discord.DMChannel.history discord.DMChannel.permissions_for -#: discord.DMChannel.send discord.Embed.add_field discord.Embed.from_dict -#: discord.Embed.insert_field_at discord.Embed.remove_field -#: discord.Embed.set_author discord.Embed.set_field_at discord.Embed.set_footer -#: discord.Embed.set_image discord.Embed.set_thumbnail discord.Emoji.delete -#: discord.Emoji.edit discord.FFmpegOpusAudio -#: discord.FFmpegOpusAudio.from_probe discord.FFmpegOpusAudio.probe -#: discord.FFmpegPCMAudio discord.Game discord.GroupCall.voice_state_for -#: discord.GroupChannel.add_recipients discord.GroupChannel.edit -#: discord.GroupChannel.fetch_message discord.GroupChannel.history -#: discord.GroupChannel.permissions_for discord.GroupChannel.remove_recipients -#: discord.GroupChannel.send discord.Guild.audit_logs discord.Guild.ban -#: discord.Guild.banner_url_as discord.Guild.change_voice_state -#: discord.Guild.chunk discord.Guild.create_custom_emoji -#: discord.Guild.create_integration discord.Guild.create_role -#: discord.Guild.create_text_channel discord.Guild.create_voice_channel -#: discord.Guild.discovery_splash_url_as discord.Guild.edit -#: discord.Guild.edit_role_positions discord.Guild.estimate_pruned_members -#: discord.Guild.fetch_ban discord.Guild.fetch_emoji discord.Guild.fetch_member -#: discord.Guild.fetch_members discord.Guild.get_channel -#: discord.Guild.get_member discord.Guild.get_member_named -#: discord.Guild.get_role discord.Guild.icon_url_as discord.Guild.kick -#: discord.Guild.prune_members discord.Guild.query_members -#: discord.Guild.splash_url_as discord.Guild.unban discord.Integration.edit -#: discord.Invite.delete discord.Member.add_roles discord.Member.avatar_url_as -#: discord.Member.edit discord.Member.fetch_message discord.Member.history -#: discord.Member.mentioned_in discord.Member.move_to -#: discord.Member.permissions_in discord.Member.remove_roles -#: discord.Member.send discord.MemberCacheFlags.from_intents -#: discord.Message.add_reaction discord.Message.clear_reaction -#: discord.Message.delete discord.Message.edit discord.Message.pin -#: discord.Message.remove_reaction discord.Message.unpin -#: discord.PCMVolumeTransformer discord.PermissionOverwrite -#: discord.PermissionOverwrite.update discord.Permissions.update -#: discord.Reaction.remove discord.Reaction.users -#: discord.RequestsWebhookAdapter -#: discord.RequestsWebhookAdapter.handle_execution_response -#: discord.RequestsWebhookAdapter.request discord.Role.delete discord.Role.edit -#: discord.Template.create_guild discord.TextChannel.clone -#: discord.TextChannel.create_invite discord.TextChannel.create_webhook -#: discord.TextChannel.delete discord.TextChannel.delete_messages -#: discord.TextChannel.edit discord.TextChannel.fetch_message -#: discord.TextChannel.follow discord.TextChannel.history -#: discord.TextChannel.overwrites_for discord.TextChannel.permissions_for -#: discord.TextChannel.purge discord.TextChannel.send -#: discord.TextChannel.set_permissions discord.User.avatar_url_as -#: discord.User.fetch_message discord.User.history discord.User.mentioned_in -#: discord.User.permissions_in discord.User.send discord.VoiceChannel.clone -#: discord.VoiceChannel.connect discord.VoiceChannel.create_invite -#: discord.VoiceChannel.delete discord.VoiceChannel.edit -#: discord.VoiceChannel.overwrites_for discord.VoiceChannel.permissions_for -#: discord.VoiceChannel.set_permissions discord.VoiceClient.connect -#: discord.VoiceClient.move_to discord.VoiceClient.on_voice_server_update -#: discord.VoiceClient.on_voice_state_update discord.VoiceClient.play -#: discord.VoiceClient.send_audio_packet discord.VoiceProtocol -#: discord.VoiceProtocol.connect discord.VoiceProtocol.disconnect -#: discord.VoiceProtocol.on_voice_server_update -#: discord.VoiceProtocol.on_voice_state_update discord.Webhook.avatar_url_as -#: discord.Webhook.delete discord.Webhook.edit discord.Webhook.from_url -#: discord.Webhook.partial discord.Webhook.send -#: discord.WebhookAdapter.handle_execution_response -#: discord.WebhookAdapter.request discord.Widget.fetch_invite -#: discord.WidgetMember.avatar_url_as discord.WidgetMember.mentioned_in -#: discord.WidgetMember.permissions_in discord.abc.GuildChannel.clone -#: discord.abc.GuildChannel.create_invite discord.abc.GuildChannel.delete -#: discord.abc.GuildChannel.overwrites_for -#: discord.abc.GuildChannel.permissions_for -#: discord.abc.GuildChannel.set_permissions -#: discord.abc.Messageable.fetch_message discord.abc.Messageable.history -#: discord.abc.Messageable.send discord.opus.load_opus -#: discord.utils.escape_markdown discord.utils.escape_mentions -#: discord.utils.find discord.utils.get discord.utils.oauth_url -#: discord.utils.resolve_invite discord.utils.resolve_template -#: discord.utils.sleep_until discord.utils.snowflake_time of -msgid "Parameters" -msgstr "パラメータ" - -#: discord.Client:6 of -msgid "" -"The maximum number of messages to store in the internal message cache. " -"This defaults to ``1000``. Passing in ``None`` disables the message " -"cache. .. versionchanged:: 1.3 Allow disabling the message cache and" -" change the default size to ``1000``." -msgstr "" - -#: discord.Client:6 of -#, fuzzy -msgid "" -"The maximum number of messages to store in the internal message cache. " -"This defaults to ``1000``. Passing in ``None`` disables the message " -"cache." -msgstr "" -"内部のメッセージキャッシュに格納するメッセージの最大数。デフォルトでは5000に設定されています。 ``None`` " -"あるいは100未満の値を渡すと、渡された値の代わりにデフォルトの値が使用されます。" - -#: discord.Client:9 of -msgid "Allow disabling the message cache and change the default size to ``1000``." -msgstr "" - -#: discord.Client:12 of -msgid "" -"The :class:`asyncio.AbstractEventLoop` to use for asynchronous " -"operations. Defaults to ``None``, in which case the default event loop is" -" used via :func:`asyncio.get_event_loop()`." -msgstr "" -"非同期操作に使用する :class:`asyncio.AbstractEventLoop` 。デフォルトは ``None`` " -"です。この場合、デフォルトのイベントループは :func:`asyncio.get_event_loop()` を介して使用されます。" - -#: discord.Client:16 of -msgid "The connector to use for connection pooling." -msgstr "コネクションプーリングに使用するコネクタ。" - -#: discord.Client:18 of -msgid "Proxy URL." -msgstr "プロキシのURL。" - -#: discord.Client:20 of -msgid "An object that represents proxy HTTP Basic Authorization." -msgstr "プロキシのHTTP Basic認証を表すオブジェクト。" - -#: discord.Client:22 of -#, fuzzy -msgid "Integer starting at ``0`` and less than :attr:`.shard_count`." -msgstr "0から始まり、 :attr:`.shard_count` より小さい整数。" - -#: discord.Client:24 of -msgid "The total number of shards." -msgstr "Shardの総数。" - -#: discord.Client:26 of -msgid "" -"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. If not given, defaults to a regularly constructed :class:`Intents` " -"class. .. versionadded:: 1.5" -msgstr "" - -#: discord.Client:26 of -msgid "" -"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. If not given, defaults to a regularly constructed :class:`Intents` " -"class." -msgstr "" - -#: discord.Client:32 of -msgid "" -"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. .. versionadded:: 1.5" -msgstr "" - -#: discord.Client:32 of -msgid "" -"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." -msgstr "" - -#: discord.Client:38 of -msgid "A deprecated alias of ``chunk_guilds_at_startup``." -msgstr "" - -#: discord.Client:40 of -msgid "" -"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``. .. versionadded:: 1.5" -msgstr "" - -#: discord.Client:40 of -msgid "" -"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``." -msgstr "" - -#: discord.Client:47 of -msgid "A status to start your presence with upon logging on to Discord." -msgstr "Discordにログインした際の、開始時ステータス。" - -#: discord.Client:49 of -msgid "An activity to start your presence with upon logging on to Discord." -msgstr "Discordにログインした際の、開始時アクティビティ。" - -#: discord.Client:51 of -msgid "" -"Control how the client handles mentions by default on every message sent." -" .. versionadded:: 1.4" -msgstr "" - -#: discord.Client:51 of -msgid "Control how the client handles mentions by default on every message sent." -msgstr "" - -#: discord.Client:55 of -msgid "" -"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." -msgstr "HEARTBEAT_ACKを受信できない際に、WebSocketをタイムアウトさせて再起動するまでの最大秒数。最初のパケットの処理に時間がかかり、接続を切断できないというような状況時に便利です。デフォルトでは60秒に設定されています。" - -#: discord.Client:60 of -msgid "" -"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. .. versionadded:: 1.4" -msgstr "" - -#: discord.Client:60 of -msgid "" -"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." -msgstr "" - -#: discord.Client:65 of -msgid "" -"Whether to dispatch presence or typing events. Defaults to ``True``. .. " -"versionadded:: 1.3 .. warning:: If this is set to ``False`` then " -"the following features will be disabled: - No user related " -"updates (:func:`on_user_update` will not dispatch) - All member " -"related events will be disabled. - :func:`on_member_update`" -" - :func:`on_member_join` - " -":func:`on_member_remove` - Typing events will be disabled " -"(:func:`on_typing`). - If ``fetch_offline_members`` is set to " -"``False`` then the user cache will not exist. This makes it " -"difficult or impossible to do many things, for example: - " -"Computing permissions - Querying members in a voice channel " -"via :attr:`VoiceChannel.members` will be empty. - Most forms " -"of receiving :class:`Member` will be receiving " -":class:`User` instead, except for message events. - " -":attr:`Guild.owner` will usually resolve to ``None``. - " -":meth:`Guild.get_member` will usually be unavailable. - " -"Anything that involves using :class:`Member`. - :attr:`users`" -" will not be as populated. - etc. In short, this makes " -"it so the only member you can reliably query is the message author. " -"Useful for bots that do not require any state." -msgstr "" - -#: discord.Client:65 of -msgid "Whether to dispatch presence or typing events. Defaults to ``True``." -msgstr "" - -#: discord.Client:71 of -msgid "If this is set to ``False`` then the following features will be disabled:" -msgstr "" - -#: discord.Client:73 of -msgid "No user related updates (:func:`on_user_update` will not dispatch)" -msgstr "" - -#: discord.Client:77 of -msgid "All member related events will be disabled." -msgstr "" - -#: discord.Client:75 of -msgid ":func:`on_member_update`" -msgstr "" - -#: discord.Client:76 discord.Intents.members:5 of -msgid ":func:`on_member_join`" -msgstr "" - -#: discord.Client:77 discord.Intents.members:6 of -msgid ":func:`on_member_remove`" -msgstr "" - -#: discord.Client:79 of -msgid "Typing events will be disabled (:func:`on_typing`)." -msgstr "" - -#: discord.Client:80 of -msgid "" -"If ``fetch_offline_members`` is set to ``False`` then the user cache will" -" not exist. This makes it difficult or impossible to do many things, for " -"example:" -msgstr "" - -#: discord.Client:83 of -msgid "Computing permissions" -msgstr "" - -#: discord.Client:84 of -msgid "" -"Querying members in a voice channel via :attr:`VoiceChannel.members` will" -" be empty." -msgstr "" - -#: discord.Client:85 of -msgid "" -"Most forms of receiving :class:`Member` will be receiving :class:`User` " -"instead, except for message events." -msgstr "" - -#: discord.Client:87 of -msgid ":attr:`Guild.owner` will usually resolve to ``None``." -msgstr "" - -#: discord.Client:88 of -msgid ":meth:`Guild.get_member` will usually be unavailable." -msgstr "" - -#: discord.Client:89 of -msgid "Anything that involves using :class:`Member`." -msgstr "" - -#: discord.Client:90 of -msgid ":attr:`users` will not be as populated." -msgstr "" - -#: discord.Client:91 of -#, fuzzy -msgid "etc." -msgstr "その他" - -#: discord.Client:93 of -msgid "" -"In short, this makes it so the only member you can reliably query is the " -"message author. Useful for bots that do not require any state." -msgstr "" - -#: discord.Client:96 of -msgid "" -"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. .. versionadded:: 1.3" -msgstr "" - -#: discord.Client:96 of -msgid "" -"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." -msgstr "" - -#: discord.Client:107 of -msgid "" -"The websocket gateway the client is currently connected to. Could be " -"``None``." -msgstr "クライアントが現在接続しているWebSocketゲートウェイ。 ``None`` でもかまいません。" - -#: discord.Client:111 of -#, fuzzy -msgid "" -"The event loop that the client uses for HTTP requests and websocket " -"operations." -msgstr "" -":class:`asyncio.AbstractEventLoop` -- " -"クライアントのHTTPリクエストとWebSocket操作に使われるイベントループ。" - -#: ../../api.rst discord.Activity discord.Activity.end -#: discord.Activity.large_image_text discord.Activity.large_image_url -#: discord.Activity.small_image_text discord.Activity.small_image_url -#: discord.Activity.start discord.AllowedMentions discord.AppInfo -#: discord.AppInfo.cover_image_url discord.AppInfo.guild -#: discord.AppInfo.icon_url discord.Attachment discord.AuditLogEntry -#: discord.AuditLogEntry.after discord.AuditLogEntry.before -#: discord.AuditLogEntry.category discord.AuditLogEntry.changes -#: discord.AuditLogEntry.created_at discord.AutoShardedClient -#: discord.AutoShardedClient.latencies discord.AutoShardedClient.latency -#: discord.AutoShardedClient.shards discord.BaseActivity.created_at -#: discord.CallMessage discord.CallMessage.call_ended -#: discord.CallMessage.channel discord.CategoryChannel -#: discord.CategoryChannel.category discord.CategoryChannel.changed_roles -#: discord.CategoryChannel.channels discord.CategoryChannel.created_at -#: discord.CategoryChannel.mention discord.CategoryChannel.permissions_synced -#: discord.CategoryChannel.text_channels discord.CategoryChannel.type -#: discord.CategoryChannel.voice_channels discord.Client -#: discord.Client.activity discord.Client.allowed_mentions -#: discord.Client.cached_messages discord.Client.emojis discord.Client.guilds -#: discord.Client.intents discord.Client.latency -#: discord.Client.private_channels discord.Client.user discord.Client.users -#: discord.Client.voice_clients discord.ClientUser -#: discord.ClientUser.avatar_url discord.ClientUser.blocked -#: discord.ClientUser.color discord.ClientUser.colour -#: discord.ClientUser.created_at discord.ClientUser.default_avatar -#: discord.ClientUser.default_avatar_url discord.ClientUser.display_name -#: discord.ClientUser.friends discord.ClientUser.mention -#: discord.ClientUser.public_flags discord.ClientUser.relationships -#: discord.Colour discord.Colour.b discord.Colour.g discord.Colour.r -#: discord.ConnectionClosed discord.CustomActivity discord.CustomActivity.type -#: discord.DMChannel discord.DMChannel.created_at discord.DMChannel.type -#: discord.Embed discord.Embed.author discord.Embed.fields discord.Embed.footer -#: discord.Embed.image discord.Embed.provider discord.Embed.thumbnail -#: discord.Embed.video discord.Emoji discord.Emoji.created_at -#: discord.Emoji.guild discord.Emoji.roles discord.Emoji.url discord.File -#: discord.Game discord.Game.end discord.Game.start discord.Game.type -#: discord.GroupCall discord.GroupCall.channel discord.GroupCall.connected -#: discord.GroupChannel discord.GroupChannel.created_at -#: discord.GroupChannel.icon_url discord.GroupChannel.type discord.Guild -#: discord.Guild.banner_url discord.Guild.bitrate_limit -#: discord.Guild.categories discord.Guild.channels discord.Guild.chunked -#: discord.Guild.created_at discord.Guild.default_role -#: discord.Guild.discovery_splash_url discord.Guild.emoji_limit -#: discord.Guild.filesize_limit discord.Guild.icon_url discord.Guild.large -#: discord.Guild.me discord.Guild.member_count discord.Guild.members -#: discord.Guild.owner discord.Guild.premium_subscribers -#: discord.Guild.public_updates_channel discord.Guild.roles -#: discord.Guild.rules_channel discord.Guild.shard_id discord.Guild.splash_url -#: discord.Guild.system_channel discord.Guild.system_channel_flags -#: discord.Guild.text_channels discord.Guild.voice_channels -#: discord.Guild.voice_client discord.HTTPException discord.Integration -#: discord.IntegrationAccount discord.Intents discord.Intents.bans -#: discord.Intents.dm_messages discord.Intents.dm_reactions -#: discord.Intents.dm_typing discord.Intents.emojis -#: discord.Intents.guild_messages discord.Intents.guild_reactions -#: discord.Intents.guild_typing discord.Intents.guilds -#: discord.Intents.integrations discord.Intents.invites discord.Intents.members -#: discord.Intents.messages discord.Intents.presences discord.Intents.reactions -#: discord.Intents.typing discord.Intents.voice_states discord.Intents.webhooks -#: discord.Invite discord.Invite.id discord.Invite.url discord.Member -#: discord.Member.activity discord.Member.color discord.Member.colour -#: discord.Member.desktop_status discord.Member.display_name -#: discord.Member.guild_permissions discord.Member.mention -#: discord.Member.mobile_status discord.Member.raw_status discord.Member.roles -#: discord.Member.status discord.Member.top_role discord.Member.voice -#: discord.Member.web_status discord.MemberCacheFlags -#: discord.MemberCacheFlags.joined discord.MemberCacheFlags.online -#: discord.MemberCacheFlags.voice discord.Message discord.Message.clean_content -#: discord.Message.created_at discord.Message.edited_at discord.Message.guild -#: discord.Message.jump_url discord.Message.raw_channel_mentions -#: discord.Message.raw_mentions discord.Message.raw_role_mentions -#: discord.Message.system_content discord.MessageFlags -#: discord.MessageFlags.crossposted discord.MessageFlags.is_crossposted -#: discord.MessageFlags.source_message_deleted -#: discord.MessageFlags.suppress_embeds discord.MessageFlags.urgent -#: discord.MessageReference discord.MessageReference.cached_message -#: discord.Object discord.Object.created_at discord.PCMAudio -#: discord.PartialEmoji discord.PartialEmoji.url discord.PartialInviteChannel -#: discord.PartialInviteChannel.created_at discord.PartialInviteChannel.mention -#: discord.PartialInviteGuild discord.PartialInviteGuild.banner_url -#: discord.PartialInviteGuild.created_at discord.PartialInviteGuild.icon_url -#: discord.PartialInviteGuild.splash_url discord.Permissions -#: discord.Permissions.add_reactions discord.Permissions.administrator -#: discord.Permissions.attach_files discord.Permissions.ban_members -#: discord.Permissions.change_nickname discord.Permissions.connect -#: discord.Permissions.create_instant_invite discord.Permissions.deafen_members -#: discord.Permissions.embed_links discord.Permissions.external_emojis -#: discord.Permissions.kick_members discord.Permissions.manage_channels -#: discord.Permissions.manage_emojis discord.Permissions.manage_guild -#: discord.Permissions.manage_messages discord.Permissions.manage_nicknames -#: discord.Permissions.manage_permissions discord.Permissions.manage_roles -#: discord.Permissions.manage_webhooks discord.Permissions.mention_everyone -#: discord.Permissions.move_members discord.Permissions.mute_members -#: discord.Permissions.priority_speaker -#: discord.Permissions.read_message_history discord.Permissions.read_messages -#: discord.Permissions.send_messages discord.Permissions.send_tts_messages -#: discord.Permissions.speak discord.Permissions.stream -#: discord.Permissions.use_external_emojis -#: discord.Permissions.use_voice_activation discord.Permissions.view_audit_log -#: discord.Permissions.view_channel discord.Permissions.view_guild_insights -#: discord.PrivilegedIntentsRequired discord.PublicUserFlags -#: discord.PublicUserFlags.bug_hunter -#: discord.PublicUserFlags.bug_hunter_level_2 -#: discord.PublicUserFlags.early_supporter -#: discord.PublicUserFlags.early_verified_bot_developer -#: discord.PublicUserFlags.hypesquad discord.PublicUserFlags.hypesquad_balance -#: discord.PublicUserFlags.hypesquad_bravery -#: discord.PublicUserFlags.hypesquad_brilliance discord.PublicUserFlags.partner -#: discord.PublicUserFlags.staff discord.PublicUserFlags.system -#: discord.PublicUserFlags.team_user discord.PublicUserFlags.verified_bot -#: discord.PublicUserFlags.verified_bot_developer -#: discord.RawBulkMessageDeleteEvent discord.RawMessageDeleteEvent -#: discord.RawMessageUpdateEvent discord.RawReactionActionEvent -#: discord.RawReactionClearEmojiEvent discord.RawReactionClearEvent -#: discord.Reaction discord.Reaction.custom_emoji discord.Relationship -#: discord.Role discord.Role.color discord.Role.colour discord.Role.created_at -#: discord.Role.members discord.Role.mention discord.Role.permissions -#: discord.ShardInfo discord.ShardInfo.latency discord.Spotify.album -#: discord.Spotify.album_cover_url discord.Spotify.artist -#: discord.Spotify.artists discord.Spotify.color discord.Spotify.colour -#: discord.Spotify.created_at discord.Spotify.duration discord.Spotify.end -#: discord.Spotify.name discord.Spotify.party_id discord.Spotify.start -#: discord.Spotify.title discord.Spotify.track_id discord.Spotify.type -#: discord.Streaming discord.Streaming.twitch_name discord.Streaming.type -#: discord.SystemChannelFlags discord.SystemChannelFlags.join_notifications -#: discord.SystemChannelFlags.premium_subscriptions discord.Team -#: discord.Team.icon_url discord.Team.owner discord.TeamMember discord.Template -#: discord.TextChannel discord.TextChannel.category -#: discord.TextChannel.changed_roles discord.TextChannel.created_at -#: discord.TextChannel.members discord.TextChannel.mention -#: discord.TextChannel.permissions_synced discord.TextChannel.type discord.User -#: discord.User.avatar_url discord.User.color discord.User.colour -#: discord.User.created_at discord.User.default_avatar -#: discord.User.default_avatar_url discord.User.display_name -#: discord.User.dm_channel discord.User.mention discord.User.public_flags -#: discord.User.relationship discord.VoiceChannel discord.VoiceChannel.category -#: discord.VoiceChannel.changed_roles discord.VoiceChannel.created_at -#: discord.VoiceChannel.members discord.VoiceChannel.mention -#: discord.VoiceChannel.permissions_synced discord.VoiceChannel.type -#: discord.VoiceClient discord.VoiceClient.average_latency -#: discord.VoiceClient.guild discord.VoiceClient.latency -#: discord.VoiceClient.source discord.VoiceClient.user discord.VoiceState -#: discord.Webhook discord.Webhook.avatar_url discord.Webhook.channel -#: discord.Webhook.created_at discord.Webhook.guild discord.Webhook.url -#: discord.WebhookAdapter discord.Widget discord.Widget.created_at -#: discord.Widget.invite_url discord.Widget.json_url discord.WidgetChannel -#: discord.WidgetChannel.created_at discord.WidgetChannel.mention -#: discord.WidgetMember discord.WidgetMember.avatar_url -#: discord.WidgetMember.color discord.WidgetMember.colour -#: discord.WidgetMember.created_at discord.WidgetMember.default_avatar -#: discord.WidgetMember.default_avatar_url discord.WidgetMember.display_name -#: discord.WidgetMember.mention discord.WidgetMember.public_flags -#: discord.abc.GuildChannel discord.abc.GuildChannel.category -#: discord.abc.GuildChannel.changed_roles discord.abc.GuildChannel.created_at -#: discord.abc.GuildChannel.mention discord.abc.GuildChannel.permissions_synced -#: discord.abc.PrivateChannel discord.abc.Snowflake -#: discord.abc.Snowflake.created_at discord.abc.User -#: discord.abc.User.display_name discord.abc.User.mention -#: discord.opus.OpusError of -msgid "type" -msgstr "" - -#: discord.Client:113 discord.VoiceClient:41 of -msgid ":class:`asyncio.AbstractEventLoop`" -msgstr "" - -#: discord.AutoShardedClient.latency:1 discord.Client.latency:1 of -msgid "Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds." -msgstr "" - -#: discord.Client.latency:3 of -msgid "This could be referred to as the Discord WebSocket protocol latency." -msgstr "これはDiscord WebSocketプロトコルの待ち時間とも言えます。" - -#: discord.AutoShardedClient.latency:7 discord.Client.latency:5 -#: discord.Guild.bitrate_limit:3 discord.ShardInfo.latency:3 -#: discord.VoiceClient.average_latency:5 discord.VoiceClient.latency:8 of -#, fuzzy -msgid ":class:`float`" -msgstr ":class:`str`" - -#: discord.Client.user:1 of -#, fuzzy -msgid "Represents the connected client. ``None`` if not logged in." -msgstr "Optional[:class:`.ClientUser`] -- 接続しているクライアントを表します。接続していない場合はNoneです。" - -#: discord.Client.user:3 of -#, fuzzy -msgid "Optional[:class:`.ClientUser`]" -msgstr ":class:`~discord.ClientUser`" - -#: discord.Client.guilds:1 of -#, fuzzy -msgid "The guilds that the connected client is a member of." -msgstr "List[:class:`.Guild`] -- 接続したクライアントがメンバーであるギルド。" - -#: discord.Client.guilds:3 of -#, fuzzy -msgid "List[:class:`.Guild`]" -msgstr ":class:`.Guild`" - -#: discord.Client.emojis:1 of -#, fuzzy -msgid "The emojis that the connected client has." -msgstr "List[:class:`.Emoji`] -- 接続したクライアントがアクセスできる絵文字。" - -#: discord.Client.emojis:3 of -#, fuzzy -msgid "List[:class:`.Emoji`]" -msgstr ":class:`.Webhook`" - -#: discord.Client.cached_messages:1 of -#, fuzzy -msgid "Read-only list of messages the connected client has cached." -msgstr "Sequence[:class:`.Message`] -- 接続されたクライアントにキャッシュされたメッセージの読み取り専用リスト。" - -#: discord.Client.cached_messages:5 of -msgid "Sequence[:class:`.Message`]" -msgstr "" - -#: discord.Client.private_channels:1 of -#, fuzzy -msgid "The private channels that the connected client is participating on." -msgstr "List[:class:`.abc.PrivateChannel`] -- 接続されたクライアントが参加しているプライベートチャンネル。" - -#: discord.Client.private_channels:5 of -msgid "" -"This returns only up to 128 most recent private channels due to an " -"internal working on how Discord deals with private channels." -msgstr "Discordでのプライベートチャンネルの取扱いは内部的に処理されているため、これは最新のプライベートチャンネルから最大128個までしか取得できません。" - -#: discord.Client.private_channels:8 of -msgid "List[:class:`.abc.PrivateChannel`]" -msgstr "" - -#: discord.Client.voice_clients:1 of -#, fuzzy -msgid "Represents a list of voice connections." -msgstr "Discordの音声接続を表します。" - -#: discord.Client.voice_clients:3 of -msgid "These are usually :class:`.VoiceClient` instances." -msgstr "" - -#: discord.Client.voice_clients:5 of -msgid "List[:class:`.VoiceProtocol`]" -msgstr "" - -#: discord.Client.is_ready:1 of -#, fuzzy -msgid ":class:`bool`: Specifies if the client's internal cache is ready for use." -msgstr "クライアントの内部キャッシュを使用できる状態にするかどうかを指定します。" - -#: ../../api.rst:2025 ../../api.rst:2033 ../../api.rst:2044 ../../api.rst:2064 -#: discord.Asset.read:1 discord.Asset.save:1 discord.Attachment.read:1 -#: discord.Attachment.save:1 discord.Attachment.to_file:1 -#: discord.AutoShardedClient.change_presence:1 -#: discord.AutoShardedClient.close:1 discord.AutoShardedClient.connect:1 -#: discord.AutoShardedClient.request_offline_members:1 -#: discord.CategoryChannel.clone:1 discord.CategoryChannel.create_invite:1 -#: discord.CategoryChannel.create_text_channel:1 -#: discord.CategoryChannel.create_voice_channel:1 -#: discord.CategoryChannel.delete:1 discord.CategoryChannel.edit:1 -#: discord.CategoryChannel.invites:1 discord.CategoryChannel.set_permissions:1 -#: discord.Client.application_info:1 discord.Client.before_identify_hook:1 -#: discord.Client.change_presence:1 discord.Client.close:1 -#: discord.Client.connect:1 discord.Client.create_guild:1 -#: discord.Client.delete_invite:1 discord.Client.fetch_channel:1 -#: discord.Client.fetch_guild:1 discord.Client.fetch_guilds:1 -#: discord.Client.fetch_invite:1 discord.Client.fetch_template:1 -#: discord.Client.fetch_user:1 discord.Client.fetch_user_profile:1 -#: discord.Client.fetch_webhook:1 discord.Client.fetch_widget:1 -#: discord.Client.login:1 discord.Client.logout:1 discord.Client.on_error:1 -#: discord.Client.request_offline_members:1 discord.Client.start:1 -#: discord.Client.wait_for:1 discord.Client.wait_until_ready:1 -#: discord.ClientUser.create_group:1 discord.ClientUser.edit:1 -#: discord.ClientUser.edit_settings:1 discord.DMChannel.fetch_message:1 -#: discord.DMChannel.pins:1 discord.DMChannel.send:1 -#: discord.DMChannel.trigger_typing:1 discord.Emoji.delete:1 -#: discord.Emoji.edit:1 discord.FFmpegOpusAudio.from_probe:1 -#: discord.FFmpegOpusAudio.probe:1 discord.GroupChannel.add_recipients:1 -#: discord.GroupChannel.edit:1 discord.GroupChannel.fetch_message:1 -#: discord.GroupChannel.leave:1 discord.GroupChannel.pins:1 -#: discord.GroupChannel.remove_recipients:1 discord.GroupChannel.send:1 -#: discord.GroupChannel.trigger_typing:1 discord.Guild.ack:1 -#: discord.Guild.ban:1 discord.Guild.bans:1 discord.Guild.change_voice_state:1 -#: discord.Guild.chunk:1 discord.Guild.create_category:1 -#: discord.Guild.create_category_channel:1 discord.Guild.create_custom_emoji:1 -#: discord.Guild.create_integration:1 discord.Guild.create_role:1 -#: discord.Guild.create_text_channel:1 discord.Guild.create_voice_channel:1 -#: discord.Guild.delete:1 discord.Guild.edit:1 -#: discord.Guild.edit_role_positions:1 discord.Guild.estimate_pruned_members:1 -#: discord.Guild.fetch_ban:1 discord.Guild.fetch_channels:1 -#: discord.Guild.fetch_emoji:1 discord.Guild.fetch_emojis:1 -#: discord.Guild.fetch_member:1 discord.Guild.fetch_members:1 -#: discord.Guild.fetch_roles:1 discord.Guild.integrations:1 -#: discord.Guild.invites:1 discord.Guild.kick:1 discord.Guild.leave:1 -#: discord.Guild.prune_members:1 discord.Guild.query_members:1 -#: discord.Guild.unban:1 discord.Guild.vanity_invite:1 discord.Guild.webhooks:1 -#: discord.Guild.widget:1 discord.Integration.delete:1 -#: discord.Integration.edit:1 discord.Integration.sync:1 -#: discord.Invite.delete:1 discord.Member.add_roles:1 discord.Member.ban:1 -#: discord.Member.block:1 discord.Member.edit:1 discord.Member.fetch_message:1 -#: discord.Member.kick:1 discord.Member.move_to:1 -#: discord.Member.mutual_friends:1 discord.Member.pins:1 -#: discord.Member.profile:1 discord.Member.remove_friend:1 -#: discord.Member.remove_roles:1 discord.Member.send:1 -#: discord.Member.send_friend_request:1 discord.Member.trigger_typing:1 -#: discord.Member.unban:1 discord.Member.unblock:1 discord.Message.ack:1 -#: discord.Message.add_reaction:1 discord.Message.clear_reaction:1 -#: discord.Message.clear_reactions:1 discord.Message.delete:1 -#: discord.Message.edit:1 discord.Message.pin:1 discord.Message.publish:1 -#: discord.Message.remove_reaction:1 discord.Message.unpin:1 -#: discord.Reaction.clear:1 discord.Reaction.remove:1 -#: discord.Relationship.accept:1 discord.Relationship.delete:1 -#: discord.Role.delete:1 discord.Role.edit:1 discord.ShardInfo.connect:1 -#: discord.ShardInfo.disconnect:1 discord.ShardInfo.reconnect:1 -#: discord.Template.create_guild:1 discord.TextChannel.clone:1 -#: discord.TextChannel.create_invite:1 discord.TextChannel.create_webhook:1 -#: discord.TextChannel.delete:1 discord.TextChannel.delete_messages:1 -#: discord.TextChannel.edit:1 discord.TextChannel.fetch_message:1 -#: discord.TextChannel.invites:1 discord.TextChannel.pins:1 -#: discord.TextChannel.purge:1 discord.TextChannel.send:1 -#: discord.TextChannel.set_permissions:1 discord.TextChannel.trigger_typing:1 -#: discord.TextChannel.webhooks:1 discord.User.block:1 -#: discord.User.fetch_message:1 discord.User.mutual_friends:1 -#: discord.User.pins:1 discord.User.profile:1 discord.User.remove_friend:1 -#: discord.User.send:1 discord.User.send_friend_request:1 -#: discord.User.trigger_typing:1 discord.User.unblock:1 -#: discord.VoiceChannel.clone:1 discord.VoiceChannel.connect:1 -#: discord.VoiceChannel.create_invite:1 discord.VoiceChannel.delete:1 -#: discord.VoiceChannel.edit:1 discord.VoiceChannel.invites:1 -#: discord.VoiceChannel.set_permissions:1 discord.VoiceClient.connect:1 -#: discord.VoiceClient.disconnect:1 discord.VoiceClient.move_to:1 -#: discord.VoiceClient.on_voice_server_update:1 -#: discord.VoiceClient.on_voice_state_update:1 discord.VoiceProtocol.connect:1 -#: discord.VoiceProtocol.disconnect:1 -#: discord.VoiceProtocol.on_voice_server_update:1 -#: discord.VoiceProtocol.on_voice_state_update:1 discord.Widget.fetch_invite:1 -#: discord.abc.GuildChannel.clone:1 discord.abc.GuildChannel.create_invite:1 -#: discord.abc.GuildChannel.delete:1 discord.abc.GuildChannel.invites:1 -#: discord.abc.GuildChannel.set_permissions:1 -#: discord.abc.Messageable.fetch_message:1 discord.abc.Messageable.pins:1 -#: discord.abc.Messageable.send:1 discord.abc.Messageable.trigger_typing:1 -#: discord.utils.sleep_until:1 of -msgid "|coro|" -msgstr "|coro|" - -#: discord.Client.on_error:3 of -msgid "The default error handler provided by the client." -msgstr "クライアントによって提供されるデフォルトのエラーハンドラ。" - -#: discord.Client.on_error:5 of -msgid "" -"By default this prints to :data:`sys.stderr` however it could be " -"overridden to have a different implementation. Check " -":func:`~discord.on_error` for more details." -msgstr "" -"デフォルトでは、これは :data:`sys.stderr` に出力されますが、異なる実装によって上書きされる可能性があります。詳細については " -":func:`~discord.on_error` を確認してください。" - -#: discord.Client.request_offline_members:3 of -msgid "" -"Requests previously offline members from the guild to be filled up into " -"the :attr:`.Guild.members` cache. This function is usually not called. It" -" should only be used if you have the ``fetch_offline_members`` parameter " -"set to ``False``." -msgstr "" -"ギルドのオフラインメンバーを :attr:`.Guild.members` " -"キャッシュへ書き込むよう要求します。この関数は通常呼び出されることはありません。 ``fetch_offline_members`` パラメータが" -" ``False`` の場合にのみ使用してください。" - -#: discord.Client.request_offline_members:8 of -msgid "" -"When the client logs on and connects to the websocket, Discord does not " -"provide the library with offline members if the number of members in the " -"guild is larger than 250. You can check if a guild is large if " -":attr:`.Guild.large` is ``True``." -msgstr "" -"クライアントがWebSocketに接続し、ログインするとき、ギルド内のメンバー数が250よりも大きいならば、Discordはライブラリにオフラインメンバーを提供しません。" -" :attr:`.Guild.large` が ``True`` かどうかでギルドが大きいかどうかを確認することができます。" - -#: discord.AutoShardedClient.request_offline_members:15 -#: discord.Client.request_offline_members:15 of -#, fuzzy -msgid "This method is deprecated. Use :meth:`Guild.chunk` instead." -msgstr "このメソッドはAPIを呼び出します。通常は :meth:`get_guild` を代わりとして使用してください。" - -#: discord.AutoShardedClient.request_offline_members:17 -#: discord.Client.request_offline_members:17 of -msgid "An argument list of guilds to request offline members for." -msgstr "オフラインメンバーを要求したいギルドのリスト。" - -#: discord.Asset.read discord.Asset.save discord.Attachment.read -#: discord.Attachment.save discord.Attachment.to_file -#: discord.AutoShardedClient.change_presence discord.AutoShardedClient.connect -#: discord.AutoShardedClient.request_offline_members -#: discord.CategoryChannel.clone discord.CategoryChannel.create_invite -#: discord.CategoryChannel.delete discord.CategoryChannel.edit -#: discord.CategoryChannel.invites discord.CategoryChannel.set_permissions -#: discord.Client.application_info discord.Client.change_presence -#: discord.Client.connect discord.Client.create_guild -#: discord.Client.delete_invite discord.Client.event -#: discord.Client.fetch_channel discord.Client.fetch_guild -#: discord.Client.fetch_guilds discord.Client.fetch_invite -#: discord.Client.fetch_template discord.Client.fetch_user -#: discord.Client.fetch_user_profile discord.Client.fetch_webhook -#: discord.Client.fetch_widget discord.Client.login -#: discord.Client.request_offline_members discord.Client.start -#: discord.Client.wait_for discord.ClientUser.avatar_url_as -#: discord.ClientUser.create_group discord.ClientUser.edit -#: discord.ClientUser.edit_settings discord.DMChannel.fetch_message -#: discord.DMChannel.history discord.DMChannel.pins discord.DMChannel.send -#: discord.Embed.set_field_at discord.Emoji.delete discord.Emoji.edit -#: discord.FFmpegOpusAudio discord.FFmpegOpusAudio.from_probe -#: discord.FFmpegOpusAudio.probe discord.FFmpegPCMAudio -#: discord.GroupChannel.add_recipients discord.GroupChannel.edit -#: discord.GroupChannel.fetch_message discord.GroupChannel.history -#: discord.GroupChannel.leave discord.GroupChannel.pins -#: discord.GroupChannel.remove_recipients discord.GroupChannel.send -#: discord.Guild.ack discord.Guild.audit_logs discord.Guild.ban -#: discord.Guild.banner_url_as discord.Guild.bans discord.Guild.chunk -#: discord.Guild.create_category discord.Guild.create_category_channel -#: discord.Guild.create_custom_emoji discord.Guild.create_integration -#: discord.Guild.create_role discord.Guild.create_text_channel -#: discord.Guild.create_voice_channel discord.Guild.delete -#: discord.Guild.discovery_splash_url_as discord.Guild.edit -#: discord.Guild.edit_role_positions discord.Guild.estimate_pruned_members -#: discord.Guild.fetch_ban discord.Guild.fetch_channels -#: discord.Guild.fetch_emoji discord.Guild.fetch_emojis -#: discord.Guild.fetch_member discord.Guild.fetch_members -#: discord.Guild.fetch_roles discord.Guild.icon_url_as -#: discord.Guild.integrations discord.Guild.invites discord.Guild.kick -#: discord.Guild.leave discord.Guild.prune_members discord.Guild.query_members -#: discord.Guild.splash_url_as discord.Guild.unban discord.Guild.vanity_invite -#: discord.Guild.webhooks discord.Guild.widget discord.Integration.delete -#: discord.Integration.edit discord.Integration.sync discord.Invite.delete -#: discord.Member.add_roles discord.Member.avatar_url_as discord.Member.block -#: discord.Member.edit discord.Member.fetch_message discord.Member.history -#: discord.Member.mutual_friends discord.Member.pins discord.Member.profile -#: discord.Member.remove_friend discord.Member.remove_roles discord.Member.send -#: discord.Member.send_friend_request discord.Member.unblock -#: discord.Message.ack discord.Message.add_reaction -#: discord.Message.clear_reaction discord.Message.clear_reactions -#: discord.Message.delete discord.Message.edit discord.Message.pin -#: discord.Message.publish discord.Message.remove_reaction -#: discord.Message.unpin discord.PCMVolumeTransformer discord.Reaction.clear -#: discord.Reaction.remove discord.Reaction.users discord.Relationship.accept -#: discord.Relationship.delete discord.Role.delete discord.Role.edit -#: discord.Template.create_guild discord.TextChannel.clone -#: discord.TextChannel.create_invite discord.TextChannel.create_webhook -#: discord.TextChannel.delete discord.TextChannel.delete_messages -#: discord.TextChannel.edit discord.TextChannel.fetch_message -#: discord.TextChannel.follow discord.TextChannel.history -#: discord.TextChannel.invites discord.TextChannel.pins -#: discord.TextChannel.purge discord.TextChannel.send -#: discord.TextChannel.set_permissions discord.TextChannel.webhooks -#: discord.User.avatar_url_as discord.User.block discord.User.fetch_message -#: discord.User.history discord.User.mutual_friends discord.User.pins -#: discord.User.profile discord.User.remove_friend discord.User.send -#: discord.User.send_friend_request discord.User.unblock -#: discord.VoiceChannel.clone discord.VoiceChannel.connect -#: discord.VoiceChannel.create_invite discord.VoiceChannel.delete -#: discord.VoiceChannel.edit discord.VoiceChannel.invites -#: discord.VoiceChannel.set_permissions discord.VoiceClient.play -#: discord.VoiceClient.send_audio_packet discord.Webhook.avatar_url_as -#: discord.Webhook.delete discord.Webhook.edit discord.Webhook.from_url -#: discord.Webhook.send discord.WidgetMember.avatar_url_as -#: discord.abc.GuildChannel.clone discord.abc.GuildChannel.create_invite -#: discord.abc.GuildChannel.delete discord.abc.GuildChannel.invites -#: discord.abc.GuildChannel.set_permissions -#: discord.abc.Messageable.fetch_message discord.abc.Messageable.history -#: discord.abc.Messageable.pins discord.abc.Messageable.send of -#, fuzzy -msgid "Raises" -msgstr "例外" - -#: discord.AutoShardedClient.request_offline_members:20 -#: discord.Client.request_offline_members:20 of -#, fuzzy -msgid "If any guild is unavailable in the collection." -msgstr ":exc:`InvalidArgument` -- いずれかのギルドが利用できない、またはコレクション内のギルドが大きくない。" - -#: discord.Client.before_identify_hook:3 of -msgid "" -"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." -msgstr "" - -#: discord.Client.before_identify_hook:7 of -msgid "The default implementation sleeps for 5 seconds." -msgstr "" - -#: discord.Client.before_identify_hook:11 of -msgid "The shard ID that requested being IDENTIFY'd" -msgstr "" - -#: discord.Client.before_identify_hook:13 of -msgid "Whether this IDENTIFY is the first initial IDENTIFY." -msgstr "" - -#: discord.Client.login:3 of -msgid "Logs in the client with the specified credentials." -msgstr "指定された資格情報を使用してクライアントにログインします。" - -#: discord.Client.login:5 of -msgid "This function can be used in two different ways." -msgstr "この関数は、異なる二通りの方法で使用することができます。" - -#: discord.Client.login:9 of -#, fuzzy -msgid "" -"Logging on with a user token is against the Discord `Terms of Service " -"`_ and doing " -"so might potentially get your account banned. Use this at your own risk." -msgstr "" -"ユーザートークンを用いてのログインはDiscordの `利用規約 `_ に違反しているため、アカウントを停止される可能性があります。自己責任で使用してください。" - -#: discord.Client.login:14 of -msgid "" -"The authentication token. Do not prefix this token with anything as the " -"library will do it for you." -msgstr "認証用のトークン。このライブラリが処理するため、トークンの頭に何も付けないでください。" - -#: discord.Client.login:17 of -msgid "" -"Keyword argument that specifies if the account logging on is a bot token " -"or not." -msgstr "ログインに使用しているアカウントがBotのトークンであるかを指定するキーワード引数。" - -#: discord.Client.login:21 of -#, fuzzy -msgid "The wrong credentials are passed." -msgstr ":exc:`.LoginFailure` -- 誤った資格情報が渡された。" - -#: discord.Client.login:22 of -#, fuzzy -msgid "" -"An unknown HTTP related error occurred, usually when it isn't 200 or " -"the known incorrect credentials passing status code." -msgstr "" -":exc:`.HTTPException` -- " -"不明なHTTP関連のエラーが発生した。通常、ステータスコードが200でないか、既知の誤った資格情報がステータスコードを渡しています。" - -#: discord.Client.logout:3 of -msgid "Logs out of Discord and closes all connections." -msgstr "Discordからログアウトし、すべての接続を終了します。" - -#: discord.Client.logout:7 of -msgid "" -"This is just an alias to :meth:`close`. If you want to do extraneous " -"cleanup when subclassing, it is suggested to override :meth:`close` " -"instead." -msgstr "" -"これは :meth:`close` の別名です。サブクラス化する場合に外部のクリーンアップを行いたい場合は、代わりに :meth:`close` " -"を上書きすることをお勧めします。" - -#: discord.AutoShardedClient.connect:3 discord.Client.connect:3 of -msgid "" -"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." -msgstr "WebSocket接続を作成し、Discordからのメッセージをリッスンできるようにします。これはイベントシステム全体とライブラリの様々な機能を実行するループです。WebSocket接続が終了するまで、制御は再開されません。" - -#: discord.AutoShardedClient.connect:8 discord.Client.connect:8 of -msgid "" -"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)." -msgstr "インターネットの障害やDiscord側の特定の障害が発生した際に再接続を試みるかどうかを表します。不正な状態へつながることによる特定の切断(無効なシャーディングペイロードや不正なトークンなど)は処理されません。" - -#: discord.AutoShardedClient.connect:14 discord.Client.connect:14 of -#, fuzzy -msgid "" -"If the gateway to connect to Discord is not found. Usually if this is" -" thrown then there is a Discord API outage." -msgstr "" -":exc:`.GatewayNotFound` -- " -"Discordに接続するゲートウェイが見つからない。通常、これが発生した場合はAPIの停止が考えられます。" - -#: discord.AutoShardedClient.connect:15 discord.Client.connect:15 of -#, fuzzy -msgid "The websocket connection has been terminated." -msgstr ":exc:`.ConnectionClosed` -- WebSocket接続が終了した。" - -#: discord.AutoShardedClient.close:3 discord.Client.close:3 of -msgid "Closes the connection to Discord." -msgstr "Discordとの接続を閉じます。" - -#: discord.Client.clear:1 of -msgid "Clears the internal state of the bot." -msgstr "Botの内部状態をクリアします。" - -#: discord.Client.clear:3 of -msgid "" -"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." -msgstr "" -"これが実行されると、Botは「再オープン」されたとみなされます。そのため、 :meth:`is_closed` や " -":meth:`is_ready` は ``False`` を返し、内部のキャッシュもクリアされます。" - -#: discord.Client.start:3 of -msgid "A shorthand coroutine for :meth:`login` + :meth:`connect`." -msgstr ":meth:`login` + :meth:`connect` を簡略化したコルーチン。" - -#: discord.Client.start:5 of -#, fuzzy -msgid "An unexpected keyword argument was received." -msgstr ":exc:`TypeError` -- 予期しないキーワード引数を受け取った。" - -#: discord.Client.run:1 of -msgid "" -"A blocking call that abstracts away the event loop initialisation from " -"you." -msgstr "イベントループの初期化を抽象化するブロッキングコール。" - -#: discord.Client.run:4 of -msgid "" -"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`." -msgstr "" -"イベントループをより詳細に制御するには、この関数を使用しないでください。 :meth:`start` または :meth:`connect` + " -":meth:`login` を使用してください。" - -#: discord.Client.run:8 of -msgid "Roughly Equivalent to: ::" -msgstr "おおよそ次のものに相当:" - -#: discord.Client.run:20 of -msgid "" -"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." -msgstr "この関数はブロッキングを行うため、必ず最後に呼び出してください。この関数を呼び出した後に呼び出されるイベントや関数は、Botが停止するまで実行されません。" - -#: discord.Client.is_closed:1 of -#, fuzzy -msgid ":class:`bool`: Indicates if the websocket connection is closed." -msgstr "WebSocketが閉じられているかどうかを表します。" - -#: discord.Client.activity:1 of -msgid "The activity being used upon logging in." -msgstr "" - -#: discord.Client.activity:4 of -msgid "Optional[:class:`.BaseActivity`]" -msgstr "" - -#: discord.Client.allowed_mentions:1 of -msgid "The allowed mention configuration." -msgstr "" - -#: discord.Client.allowed_mentions:5 of -#, fuzzy -msgid "Optional[:class:`~discord.AllowedMentions`]" -msgstr ":class:`~discord.ClientUser`" - -#: discord.Client.intents:1 of -msgid "The intents configured for this connection." -msgstr "" - -#: discord.Client.intents:5 of -#, fuzzy -msgid ":class:`Intents`" -msgstr ":class:`bytes`" - -#: discord.Client.users:1 of -#, fuzzy -msgid "Returns a list of all the users the bot can see." -msgstr "List[:class:`~discord.User`] -- ボットが見ることができるすべてのユーザーのリストを返します。" - -#: discord.Client.users:3 of -#, fuzzy -msgid "List[:class:`~discord.User`]" -msgstr ":class:`~discord.User`" - -#: discord.Client.get_channel:1 discord.Guild.get_channel:1 of -#, fuzzy -msgid "Returns a channel with the given ID." -msgstr "このユーザーと :class:`DMChannel` を作ります。" - -#: discord.Client.get_channel:3 discord.Client.get_emoji:3 -#: discord.Client.get_guild:3 discord.Client.get_user:3 -#: discord.Guild.get_channel:3 discord.Guild.get_member:3 -#: discord.Guild.get_role:3 of -#, fuzzy -msgid "The ID to search for." -msgstr "検索するイテラブル。" - -#: ../../api.rst discord.Asset.read discord.Asset.save discord.Attachment.read -#: discord.Attachment.save discord.Attachment.to_file discord.AudioSource.read -#: discord.CallMessage.duration discord.CategoryChannel.clone -#: discord.CategoryChannel.create_invite -#: discord.CategoryChannel.create_text_channel -#: discord.CategoryChannel.create_voice_channel discord.CategoryChannel.invites -#: discord.CategoryChannel.overwrites discord.CategoryChannel.overwrites_for -#: discord.CategoryChannel.permissions_for discord.Client.application_info -#: discord.Client.create_guild discord.Client.fetch_channel -#: discord.Client.fetch_guild discord.Client.fetch_invite -#: discord.Client.fetch_template discord.Client.fetch_user -#: discord.Client.fetch_user_profile discord.Client.fetch_webhook -#: discord.Client.fetch_widget discord.Client.get_channel -#: discord.Client.get_emoji discord.Client.get_guild discord.Client.get_user -#: discord.Client.wait_for discord.ClientUser.avatar_url_as -#: discord.ClientUser.create_group discord.ClientUser.edit_settings -#: discord.ClientUser.get_relationship discord.ClientUser.mentioned_in -#: discord.DMChannel.fetch_message discord.DMChannel.permissions_for -#: discord.DMChannel.pins discord.DMChannel.send -#: discord.FFmpegOpusAudio.from_probe discord.FFmpegOpusAudio.probe -#: discord.FFmpegOpusAudio.read discord.FFmpegPCMAudio.read -#: discord.GroupCall.voice_state_for discord.GroupChannel.fetch_message -#: discord.GroupChannel.permissions_for discord.GroupChannel.pins -#: discord.GroupChannel.send discord.Guild.banner_url_as discord.Guild.bans -#: discord.Guild.by_category discord.Guild.create_category -#: discord.Guild.create_category_channel discord.Guild.create_custom_emoji -#: discord.Guild.create_role discord.Guild.create_text_channel -#: discord.Guild.create_voice_channel discord.Guild.discovery_splash_url_as -#: discord.Guild.edit_role_positions discord.Guild.estimate_pruned_members -#: discord.Guild.fetch_ban discord.Guild.fetch_channels -#: discord.Guild.fetch_emoji discord.Guild.fetch_emojis -#: discord.Guild.fetch_member discord.Guild.fetch_roles -#: discord.Guild.get_channel discord.Guild.get_member -#: discord.Guild.get_member_named discord.Guild.get_role -#: discord.Guild.icon_url_as discord.Guild.integrations discord.Guild.invites -#: discord.Guild.prune_members discord.Guild.query_members -#: discord.Guild.splash_url_as discord.Guild.vanity_invite -#: discord.Guild.webhooks discord.Guild.widget discord.Member.avatar_url_as -#: discord.Member.create_dm discord.Member.fetch_message -#: discord.Member.mentioned_in discord.Member.mutual_friends -#: discord.Member.permissions_in discord.Member.pins discord.Member.profile -#: discord.Member.send discord.MemberCacheFlags.from_intents -#: discord.PCMAudio.read discord.PCMVolumeTransformer.read -#: discord.PartialInviteGuild.banner_url_as -#: discord.PartialInviteGuild.icon_url_as -#: discord.PartialInviteGuild.splash_url_as -#: discord.PermissionOverwrite.is_empty discord.Template.create_guild -#: discord.TextChannel.clone discord.TextChannel.create_invite -#: discord.TextChannel.create_webhook discord.TextChannel.fetch_message -#: discord.TextChannel.follow discord.TextChannel.invites -#: discord.TextChannel.last_message discord.TextChannel.overwrites -#: discord.TextChannel.overwrites_for discord.TextChannel.permissions_for -#: discord.TextChannel.pins discord.TextChannel.purge discord.TextChannel.send -#: discord.TextChannel.webhooks discord.User.avatar_url_as -#: discord.User.create_dm discord.User.fetch_message discord.User.mentioned_in -#: discord.User.mutual_friends discord.User.pins discord.User.profile -#: discord.User.send discord.VoiceChannel.clone discord.VoiceChannel.connect -#: discord.VoiceChannel.create_invite discord.VoiceChannel.invites -#: discord.VoiceChannel.overwrites discord.VoiceChannel.overwrites_for -#: discord.VoiceChannel.permissions_for discord.VoiceChannel.voice_states -#: discord.Webhook.avatar_url_as discord.Webhook.from_url -#: discord.Webhook.partial discord.Webhook.send discord.Widget.fetch_invite -#: discord.WidgetMember.avatar_url_as discord.WidgetMember.mentioned_in -#: discord.abc.GuildChannel.clone discord.abc.GuildChannel.create_invite -#: discord.abc.GuildChannel.invites discord.abc.GuildChannel.overwrites -#: discord.abc.GuildChannel.overwrites_for -#: discord.abc.GuildChannel.permissions_for -#: discord.abc.Messageable.fetch_message discord.abc.Messageable.pins -#: discord.abc.Messageable.send discord.opus.is_loaded -#: discord.utils.escape_markdown discord.utils.escape_mentions -#: discord.utils.oauth_url discord.utils.resolve_invite -#: discord.utils.resolve_template discord.utils.snowflake_time of -msgid "Returns" -msgstr "戻り値" - -#: discord.Client.get_channel:6 discord.Guild.get_channel:6 of -msgid "The returned channel or ``None`` if not found." -msgstr "" - -#: ../../api.rst discord.Asset.read discord.Asset.save discord.Attachment.read -#: discord.Attachment.save discord.Attachment.to_file discord.AudioSource.read -#: discord.CallMessage.duration discord.CategoryChannel.clone -#: discord.CategoryChannel.create_invite -#: discord.CategoryChannel.create_text_channel -#: discord.CategoryChannel.create_voice_channel discord.CategoryChannel.invites -#: discord.CategoryChannel.overwrites discord.CategoryChannel.overwrites_for -#: discord.CategoryChannel.permissions_for discord.Client.application_info -#: discord.Client.create_guild discord.Client.fetch_channel -#: discord.Client.fetch_guild discord.Client.fetch_invite -#: discord.Client.fetch_template discord.Client.fetch_user -#: discord.Client.fetch_user_profile discord.Client.fetch_webhook -#: discord.Client.fetch_widget discord.Client.get_channel -#: discord.Client.get_emoji discord.Client.get_guild discord.Client.get_user -#: discord.Client.wait_for discord.ClientUser.avatar_url_as -#: discord.ClientUser.create_group discord.ClientUser.edit_settings -#: discord.ClientUser.get_relationship discord.ClientUser.mentioned_in -#: discord.DMChannel.fetch_message discord.DMChannel.permissions_for -#: discord.DMChannel.pins discord.DMChannel.send -#: discord.FFmpegOpusAudio.from_probe discord.FFmpegOpusAudio.probe -#: discord.FFmpegOpusAudio.read discord.FFmpegPCMAudio.read -#: discord.GroupCall.voice_state_for discord.GroupChannel.fetch_message -#: discord.GroupChannel.permissions_for discord.GroupChannel.pins -#: discord.GroupChannel.send discord.Guild.banner_url_as discord.Guild.bans -#: discord.Guild.by_category discord.Guild.create_category -#: discord.Guild.create_category_channel discord.Guild.create_custom_emoji -#: discord.Guild.create_role discord.Guild.create_text_channel -#: discord.Guild.create_voice_channel discord.Guild.discovery_splash_url_as -#: discord.Guild.edit_role_positions discord.Guild.estimate_pruned_members -#: discord.Guild.fetch_ban discord.Guild.fetch_channels -#: discord.Guild.fetch_emoji discord.Guild.fetch_emojis -#: discord.Guild.fetch_member discord.Guild.fetch_roles -#: discord.Guild.get_channel discord.Guild.get_member -#: discord.Guild.get_member_named discord.Guild.get_role -#: discord.Guild.icon_url_as discord.Guild.integrations discord.Guild.invites -#: discord.Guild.prune_members discord.Guild.query_members -#: discord.Guild.splash_url_as discord.Guild.vanity_invite -#: discord.Guild.webhooks discord.Guild.widget discord.Member.avatar_url_as -#: discord.Member.create_dm discord.Member.fetch_message -#: discord.Member.mentioned_in discord.Member.mutual_friends -#: discord.Member.permissions_in discord.Member.pins discord.Member.profile -#: discord.Member.send discord.MemberCacheFlags.from_intents -#: discord.PCMAudio.read discord.PCMVolumeTransformer.read -#: discord.PartialInviteGuild.banner_url_as -#: discord.PartialInviteGuild.icon_url_as -#: discord.PartialInviteGuild.splash_url_as -#: discord.PermissionOverwrite.is_empty discord.Template.create_guild -#: discord.TextChannel.clone discord.TextChannel.create_invite -#: discord.TextChannel.create_webhook discord.TextChannel.fetch_message -#: discord.TextChannel.follow discord.TextChannel.invites -#: discord.TextChannel.last_message discord.TextChannel.overwrites -#: discord.TextChannel.overwrites_for discord.TextChannel.permissions_for -#: discord.TextChannel.pins discord.TextChannel.purge discord.TextChannel.send -#: discord.TextChannel.webhooks discord.User.avatar_url_as -#: discord.User.create_dm discord.User.fetch_message discord.User.mentioned_in -#: discord.User.mutual_friends discord.User.pins discord.User.profile -#: discord.User.send discord.VoiceChannel.clone discord.VoiceChannel.connect -#: discord.VoiceChannel.create_invite discord.VoiceChannel.invites -#: discord.VoiceChannel.overwrites discord.VoiceChannel.overwrites_for -#: discord.VoiceChannel.permissions_for discord.VoiceChannel.voice_states -#: discord.Webhook.avatar_url_as discord.Webhook.from_url -#: discord.Webhook.partial discord.Webhook.send discord.Widget.fetch_invite -#: discord.WidgetMember.avatar_url_as discord.WidgetMember.mentioned_in -#: discord.abc.GuildChannel.clone discord.abc.GuildChannel.create_invite -#: discord.abc.GuildChannel.invites discord.abc.GuildChannel.overwrites -#: discord.abc.GuildChannel.overwrites_for -#: discord.abc.GuildChannel.permissions_for -#: discord.abc.Messageable.fetch_message discord.abc.Messageable.pins -#: discord.abc.Messageable.send discord.opus.is_loaded -#: discord.utils.escape_markdown discord.utils.escape_mentions -#: discord.utils.oauth_url discord.utils.resolve_invite -#: discord.utils.resolve_template discord.utils.snowflake_time of -msgid "Return type" -msgstr "戻り値の型" - -#: discord.Client.get_channel:7 of -#, fuzzy -msgid "Optional[Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: discord.Client.get_guild:1 of -#, fuzzy -msgid "Returns a guild with the given ID." -msgstr "Optional[:class:`.Guild`]: 与えられたIDを持つギルドを返します。" - -#: discord.Client.get_guild:6 of -msgid "The guild or ``None`` if not found." -msgstr "" - -#: discord.Client.get_guild:7 of -#, fuzzy -msgid "Optional[:class:`.Guild`]" -msgstr ":class:`.Guild`" - -#: discord.Client.get_user:1 of -#, fuzzy -msgid "Returns a user with the given ID." -msgstr "Optional[:class:`~discord.User`]: 与えられたIDを持つユーザーを返します。" - -#: discord.Client.get_user:6 of -msgid "The user or ``None`` if not found." -msgstr "" - -#: discord.Client.get_user:7 of -#, fuzzy -msgid "Optional[:class:`~discord.User`]" -msgstr ":class:`~discord.User`" - -#: discord.Client.get_emoji:1 of -#, fuzzy -msgid "Returns an emoji with the given ID." -msgstr "Optional[:class:`.Emoji`]: 与えられたIDを持つ絵文字を返します。" - -#: discord.Client.get_emoji:6 of -msgid "The custom emoji or ``None`` if not found." -msgstr "" - -#: discord.Client.get_emoji:7 of -msgid "Optional[:class:`.Emoji`]" -msgstr "" - -#: discord.Client.get_all_channels:1 of -msgid "" -"A generator that retrieves every :class:`.abc.GuildChannel` the client " -"can 'access'." -msgstr "クライアントが「アクセス」できるすべての :class:`.abc.GuildChannel` のジェネレータを取得します。" - -#: discord.Client.get_all_channels:3 discord.Client.get_all_members:3 of -msgid "This is equivalent to: ::" -msgstr "使用例:" - -#: discord.Client.get_all_channels:11 of -msgid "" -"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." -msgstr "" -":class:`.abc.GuildChannel` " -"を受け取ったからと言って、そのチャンネルで発言ができるという意味ではありません。発言可能なチャンネルのみを取得したいのなら、 " -":meth:`.abc.GuildChannel.permissions_for` を使いましょう。" - -#: discord.Client.fetch_guilds discord.Client.get_all_channels -#: discord.Client.get_all_members discord.DMChannel.history -#: discord.GroupChannel.history discord.Guild.audit_logs -#: discord.Guild.fetch_members discord.Member.history discord.Reaction.users -#: discord.TextChannel.history discord.User.history -#: discord.abc.Messageable.history of -msgid "Yields" -msgstr "Yieldする値" - -#: discord.Client.get_all_channels:15 of -#, fuzzy -msgid ":class:`.abc.GuildChannel` -- A channel the client can 'access'." -msgstr "クライアントが「アクセス」できるすべての :class:`.abc.GuildChannel` のジェネレータを取得します。" - -#: discord.Client.get_all_members:1 of -msgid "Returns a generator with every :class:`.Member` the client can see." -msgstr "クライアントが参照可能なすべての :class:`.Member` のジェネレータを返します。" - -#: discord.Client.get_all_members:9 of -#, fuzzy -msgid ":class:`.Member` -- A member the client can see." -msgstr "クライアントが参照可能なすべての :class:`.Member` のジェネレータを返します。" - -#: discord.Client.wait_until_ready:3 of -msgid "Waits until the client's internal cache is all ready." -msgstr "クライアントの内部キャッシュの準備が完了するまで待機します。" - -#: discord.Client.wait_for:3 of -msgid "Waits for a WebSocket event to be dispatched." -msgstr "WebSocketイベントがディスパッチされるまで待機します。" - -#: discord.Client.wait_for:5 of -msgid "" -"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." -msgstr "メッセージの送信者が、メッセージに返信したり、リアクションをつけたり、編集したりする、自己完結型の処理に利用できます。" - -#: discord.Client.wait_for:9 of -msgid "" -"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." -msgstr "" -"``timeout`` パラメータは :func:`asyncio.wait_for` " -"に渡されます。デフォルトではタイムアウトしません。タイムアウトした際に :exc:`asyncio.TimeoutError` " -"が発生するのは、使いやすさを考慮したためです。" - -#: discord.Client.wait_for:14 of -msgid "" -"In case the event returns multiple arguments, a :class:`tuple` containing" -" those arguments is returned instead. Please check the " -":ref:`documentation ` for a list of events and their " -"parameters." -msgstr "" -"イベントが複数の引数を返す場合は、それらを含む :class:`tuple` が代わりに返ります。イベントとそのパラメーターについては " -":ref:`ドキュメント ` を参照してください。" - -#: discord.Client.wait_for:19 of -msgid "This function returns the **first event that meets the requirements**." -msgstr "この関数は **条件を満たす最初のイベント** を返します。" - -#: discord.CategoryChannel.set_permissions:21 discord.Client.fetch_guilds:15 -#: discord.Client.wait_for:22 discord.DMChannel.history:6 -#: discord.FFmpegOpusAudio.from_probe:7 discord.GroupChannel.history:6 -#: discord.Guild.audit_logs:6 discord.Guild.create_text_channel:20 -#: discord.Guild.fetch_members:25 discord.Member.history:6 -#: discord.Reaction.users:7 discord.TextChannel.history:6 -#: discord.TextChannel.purge:17 discord.TextChannel.set_permissions:21 -#: discord.User.history:6 discord.VoiceChannel.set_permissions:21 -#: discord.abc.GuildChannel.set_permissions:21 -#: discord.abc.Messageable.history:6 discord.utils.get:16 of -msgid "Examples" -msgstr "例" - -#: discord.Client.wait_for:23 of -msgid "Waiting for a user reply: ::" -msgstr "ユーザーからの返信を待つ場合: ::" - -#: discord.Client.wait_for:37 of -msgid "Waiting for a thumbs up reaction from the message author: ::" -msgstr "メッセージ送信者がサムズアップリアクションを付けるのを待つ場合: ::" - -#: discord.Client.wait_for:55 of -msgid "" -"The event name, similar to the :ref:`event reference `, but without the ``on_`` prefix, to wait for." -msgstr "" -"イベント名は :ref:`イベントリファレンス ` に似ていますが接頭詞の ``on_`` " -"が必要ありません。" - -#: discord.Client.wait_for:58 of -msgid "" -"A predicate to check what to wait for. The arguments must meet the " -"parameters of the event being waited for." -msgstr "待っているものに該当するかを確認する関数。引数は待機しているイベントのパラメータを満たしている必要があります。" - -#: discord.Client.wait_for:61 of -msgid "" -"The number of seconds to wait before timing out and raising " -":exc:`asyncio.TimeoutError`." -msgstr "タイムアウトして :exc:`asyncio.TimeoutError` が発生するまでの秒数。" - -#: discord.Client.wait_for:65 of -#, fuzzy -msgid "If a timeout is provided and it was reached." -msgstr ":exc:`asyncio.TimeoutError` -- タイムアウト値が設定されていて、かつその時間が経過した。" - -#: discord.Client.wait_for:67 of -msgid "" -"Returns no arguments, a single argument, or a :class:`tuple` of multiple " -"arguments that mirrors the parameters passed in the :ref:`event reference" -" `." -msgstr "" -"単一の引数、あるいは :ref:`イベントリファレンス ` のパラメータを反映した複数の引数の値を含む " -":class:`tuple` が返ります。返る引数がない場合もあります。" - -#: discord.Client.event:1 of -msgid "A decorator that registers an event to listen to." -msgstr "リッスンするイベントを登録するデコレータ。" - -#: discord.Client.event:3 of -msgid "" -"You can find more info about the events on the :ref:`documentation below " -"`." -msgstr "イベントの詳細については :ref:`以下のドキュメント ` を参照してください。" - -#: discord.Client.event:5 of -msgid "" -"The events must be a :ref:`coroutine `, if not, " -":exc:`TypeError` is raised." -msgstr "イベントは :ref:`コルーチン ` でなければいけません。違う場合は :exc:`TypeError` が発生します。" - -#: discord.Client.change_presence:6 discord.Client.event:8 of -msgid "Example" -msgstr "例" - -#: discord.Client.event:15 of -#, fuzzy -msgid "The coroutine passed is not actually a coroutine." -msgstr ":exc:`TypeError` -- 渡されたコルーチンが実際にはコルーチンではない。" - -#: discord.AutoShardedClient.change_presence:3 discord.Client.change_presence:3 -#: of -msgid "Changes the client's presence." -msgstr "クライアントのプレゼンスを変更します。" - -#: discord.AutoShardedClient.change_presence:10 -#: discord.Client.change_presence:12 of -msgid "The activity being done. ``None`` if no currently active activity is done." -msgstr "実行中のアクティビティ。何も実行していない場合は ``None`` です。" - -#: discord.Client.change_presence:14 of -msgid "" -"Indicates what status to change to. If ``None``, then " -":attr:`.Status.online` is used." -msgstr "変更するステータスを示します。 ``None`` の場合、:attr:`.Status.online`となります。" - -#: discord.AutoShardedClient.change_presence:15 -#: discord.Client.change_presence:17 of -msgid "" -"Indicates if you are going AFK. This allows the discord client to know " -"how to handle push notifications better for you in case you are actually " -"idle and not lying." -msgstr "AFKの状態にするかを示します。これによって、実際に退席中の場合に、Discordクライアントにプッシュ通知をよりよく扱わせることができます。" - -#: discord.Client.change_presence:22 of -#, fuzzy -msgid "If the ``activity`` parameter is not the proper type." -msgstr ":exc:`.InvalidArgument` -- ``activity`` に渡された値が適切な型でない。" - -#: discord.Client.fetch_guilds:3 of -msgid "Retrieves an :class:`.AsyncIterator` that enables receiving your guilds." -msgstr "Botが所属するGuildを取得できる、 :class:`AsyncIterator` を取得します。" - -#: discord.Client.fetch_guilds:7 of -msgid "" -"Using this, you will only receive :attr:`.Guild.owner`, " -":attr:`.Guild.icon`, :attr:`.Guild.id`, and :attr:`.Guild.name` per " -":class:`.Guild`." -msgstr "" -"これを使った場合、各 :class:`Guild` の :attr:`Guild.owner` 、 :attr:`Guild.icon` 、 " -":attr:`Guild.id` 、 :attr:`Guild.name` のみ取得できます。" - -#: discord.Client.fetch_guilds:12 of -msgid "" -"This method is an API call. For general usage, consider :attr:`guilds` " -"instead." -msgstr "これはAPIを呼び出します。通常は :attr:`guilds` を代わりに使用してください。" - -#: discord.Client.fetch_guilds:16 discord.DMChannel.history:7 -#: discord.GroupChannel.history:7 discord.Guild.fetch_members:26 -#: discord.Member.history:7 discord.Reaction.users:8 -#: discord.TextChannel.history:7 discord.User.history:7 -#: discord.abc.Messageable.history:7 of -msgid "Usage ::" -msgstr "使い方 ::" - -#: discord.Client.fetch_guilds:21 discord.Guild.fetch_members:31 of -msgid "Flattening into a list ::" -msgstr "リストへフラット化 ::" - -#: discord.Client.fetch_guilds:26 discord.DMChannel.history:19 -#: discord.GroupChannel.history:19 discord.Guild.fetch_members:11 -#: discord.Member.edit:21 discord.Member.history:19 -#: discord.TextChannel.history:19 discord.User.history:19 -#: discord.abc.Messageable.history:19 of -msgid "All parameters are optional." -msgstr "すべてのパラメータがオプションです。" - -#: discord.Client.fetch_guilds:28 of -#, fuzzy -msgid "" -"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 ``100``." -msgstr "" -"取得するギルドの数。 ``None`` " -"の場合、あなたがアクセスできるギルドすべてを取得します。ただし、これには時間がかかります。デフォルトは100です。" - -#: discord.Client.fetch_guilds:33 of -msgid "" -"Retrieves guilds before this date or object. If a date is provided it " -"must be a timezone-naive datetime representing UTC time." -msgstr "" -"この日付またはオブジェクトの前のGuildを取得します。もし日付が与えられた場合は、それはUTC時刻を表し、timezone " -"naiveであるdatetimeでないといけません。" - -#: discord.Client.fetch_guilds:36 of -msgid "" -"Retrieve guilds after this date or object. If a date is provided it must " -"be a timezone-naive datetime representing UTC time." -msgstr "" -"この日付またはオブジェクトの後のGuildを取得します。もし日付が与えられた場合は、それはUTC時刻を表し、timezone " -"naiveであるdatetimeでないといけません。" - -#: discord.Client.fetch_guilds:40 of -#, fuzzy -msgid "Getting the guilds failed." -msgstr "ギルドのアイコンの変更" - -#: discord.Client.fetch_guilds:42 of -msgid ":class:`.Guild` -- The guild with the guild data parsed." -msgstr ":class:`.Guild` -- データを解析したGuild。" - -#: discord.Client.fetch_template:3 of -#, fuzzy -msgid "Gets a :class:`.Template` from a discord.new URL or code." -msgstr ":class:`.Invite` をdiscord.gg URLやIDから取得します。" - -#: discord.Client.fetch_template:5 of -#, fuzzy -msgid "The Discord Template Code or URL (must be a discord.new URL)." -msgstr "Discordの招待ID、またはURL(discord.gg URLである必要があります)。" - -#: discord.Client.fetch_template:8 of -#, fuzzy -msgid "The template is invalid." -msgstr "メンバーがオンライン。" - -#: discord.Client.fetch_template:9 of -msgid "Getting the template failed." -msgstr "" - -#: discord.Client.fetch_template:11 of -#, fuzzy -msgid "The template from the URL/code." -msgstr "ギルドの名前。" - -#: discord.Client.fetch_template:12 of -#, fuzzy -msgid ":class:`.Template`" -msgstr ":class:`.Widget`" - -#: discord.Client.fetch_guild:3 of -msgid "Retrieves a :class:`.Guild` from an ID." -msgstr "IDから :class:`.Guild` を取得します。" - -#: discord.Client.fetch_guild:7 of -#, fuzzy -msgid "" -"Using this, you will **not** receive :attr:`.Guild.channels`, " -":attr:`.Guild.members`, :attr:`.Member.activity` and " -":attr:`.Member.voice` per :class:`.Member`." -msgstr "" -"これを使用した場合、 :attr:`.Guild.channels`、 :class:`.Guild.members` 、そして各 " -":class:`.Member` ごとの :attr:`.Member.activity` 、 :attr:`.Member.voice` " -"を取得することは **できません** 。" - -#: discord.Client.fetch_guild:12 of -msgid "" -"This method is an API call. For general usage, consider :meth:`get_guild`" -" instead." -msgstr "このメソッドはAPIを呼び出します。通常は :meth:`get_guild` を代わりとして使用してください。" - -#: discord.Client.fetch_guild:14 of -msgid "The guild's ID to fetch from." -msgstr "取得したいギルドのID。" - -#: discord.Client.fetch_guild:17 discord.Guild.fetch_member:12 of -#, fuzzy -msgid "You do not have access to the guild." -msgstr ":exc:`.Forbidden` -- ギルドにアクセスできない。" - -#: discord.Client.fetch_guild:18 of -#, fuzzy -msgid "Getting the guild failed." -msgstr "ギルドのアイコンの変更" - -#: discord.Client.fetch_guild:20 of -msgid "The guild from the ID." -msgstr "IDから取得したギルド。" - -#: discord.Client.create_guild:25 discord.Client.fetch_guild:21 -#: discord.Template.create_guild:21 of -msgid ":class:`.Guild`" -msgstr ":class:`.Guild`" - -#: discord.Client.create_guild:3 of -msgid "Creates a :class:`.Guild`." -msgstr ":class:`.Guild` を作成します。" - -#: discord.Client.create_guild:5 discord.Template.create_guild:5 of -msgid "Bot accounts in more than 10 guilds are not allowed to create guilds." -msgstr "10以上のギルドに参加しているBotアカウントはギルドの作成ができません。" - -#: discord.Client.create_guild:7 discord.Template.create_guild:7 of -msgid "The name of the guild." -msgstr "ギルドの名前。" - -#: discord.Client.create_guild:9 discord.Template.create_guild:9 of -msgid "" -"The region for the voice communication server. Defaults to " -":attr:`.VoiceRegion.us_west`." -msgstr "ボイスチャンネルの通信サーバーのリージョンです。デフォルトは :attr:`.VoiceRegion.us_west` です。" - -#: discord.Client.create_guild:12 discord.Template.create_guild:12 of -msgid "" -"The :term:`py:bytes-like object` representing the icon. See " -":meth:`.ClientUser.edit` for more details on what is expected." -msgstr "" -"アイコンを表す :term:`py:bytes-like object` です。 :meth:`.ClientUser.edit` " -"で、予期されるデータの詳細を確認してください。" - -#: discord.Client.create_guild:15 of -msgid "The code for a template to create the guild with. .. versionadded:: 1.4" -msgstr "" - -#: discord.Client.create_guild:15 of -msgid "The code for a template to create the guild with." -msgstr "" - -#: discord.Client.create_guild:20 discord.Template.create_guild:16 of -#, fuzzy -msgid "Guild creation failed." -msgstr ":exc:`.HTTPException` -- ギルドの作成に失敗した。" - -#: discord.Client.create_guild:21 discord.Template.create_guild:17 of -#, fuzzy -msgid "Invalid icon image format given. Must be PNG or JPG." -msgstr ":exc:`.InvalidArgument` -- アイコン画像として無効なフォーマットの画像が渡された。PNGかJPGで指定してください。" - -#: discord.Client.create_guild:23 discord.Template.create_guild:19 of -msgid "The guild created. This is not the same guild that is added to cache." -msgstr "作成されたギルド。キャッシュに追加されるギルドとは別物です。" - -#: discord.Client.fetch_invite:3 of -msgid "Gets an :class:`.Invite` from a discord.gg URL or ID." -msgstr ":class:`.Invite` をdiscord.gg URLやIDから取得します。" - -#: discord.Client.fetch_invite:7 of -#, fuzzy -msgid "" -"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." -msgstr "" -"もしあなたがInviteのGuildに参加していない場合、 :class:`.Invite` のguildとchannel属性はそれぞれ " -":class:`.PartialInviteGuild` と :class:`PartialInviteChannel` になります。" - -#: discord.Client.fetch_invite:11 of -msgid "The Discord invite ID or URL (must be a discord.gg URL)." -msgstr "Discordの招待ID、またはURL(discord.gg URLである必要があります)。" - -#: discord.Client.fetch_invite:13 of -msgid "" -"Whether to include count information in the invite. This fills the " -":attr:`.Invite.approximate_member_count` and " -":attr:`.Invite.approximate_presence_count` fields." -msgstr "" -"招待にカウントの情報を含めるかどうか。これにより :attr:`.Invite.approximate_member_count` と " -":attr:`.Invite.approximate_presence_count` が追加されます。" - -#: discord.Client.fetch_invite:18 of -#, fuzzy -msgid "The invite has expired or is invalid." -msgstr ":exc:`.NotFound` -- 招待の有効期限が切れている、または無効。" - -#: discord.Client.fetch_invite:19 of -#, fuzzy -msgid "Getting the invite failed." -msgstr ":exc:`.HTTPException` -- 招待の取得に失敗した。" - -#: discord.Client.fetch_invite:21 discord.Widget.fetch_invite:12 of -msgid "The invite from the URL/ID." -msgstr "URL/IDから取得した招待。" - -#: discord.Client.fetch_invite:22 of -msgid ":class:`.Invite`" -msgstr ":class:`.Invite`" - -#: discord.Client.delete_invite:3 of -msgid "Revokes an :class:`.Invite`, URL, or ID to an invite." -msgstr ":class:`.Invite` や、招待のURL、IDを削除します。" - -#: discord.Client.delete_invite:5 of -msgid "" -"You must have the :attr:`~.Permissions.manage_channels` permission in the" -" associated guild to do this." -msgstr "これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` 権限が必要です。" - -#: discord.Client.delete_invite:8 of -msgid "The invite to revoke." -msgstr "取り消す招待。" - -#: discord.Client.delete_invite:11 discord.Invite.delete:10 of -#, fuzzy -msgid "You do not have permissions to revoke invites." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.Client.delete_invite:12 discord.Invite.delete:11 of -#, fuzzy -msgid "The invite is invalid or expired." -msgstr ":exc:`.NotFound` -- 招待が無効、あるいは期限切れになっている。" - -#: discord.Client.delete_invite:13 discord.Invite.delete:12 of -#, fuzzy -msgid "Revoking the invite failed." -msgstr ":exc:`.HTTPException` -- 招待の取り消しに失敗した。" - -#: discord.Client.fetch_widget:3 of -msgid "Gets a :class:`.Widget` from a guild ID." -msgstr "ギルドIDから :class:`.Widget` を取得します。" - -#: discord.Client.fetch_widget:7 discord.Guild.widget:7 of -msgid "The guild must have the widget enabled to get this information." -msgstr "この情報を取得するためには、ギルドのウィジェットを有効化しておく必要があります。" - -#: discord.Client.fetch_widget:9 of -msgid "The ID of the guild." -msgstr "ギルドのID。" - -#: discord.Client.fetch_widget:12 discord.Guild.widget:9 of -#, fuzzy -msgid "The widget for this guild is disabled." -msgstr ":exc:`.Forbidden` -- ギルドのウィジェットが有効化されていない。" - -#: discord.Client.fetch_widget:13 discord.Guild.widget:10 of -#, fuzzy -msgid "Retrieving the widget failed." -msgstr ":exc:`.HTTPException` -- ウィジェットの取得に失敗した。" - -#: discord.Client.fetch_widget:15 discord.Guild.widget:12 of -msgid "The guild's widget." -msgstr "ギルドのウィジェット。" - -#: discord.Client.fetch_widget:16 of -msgid ":class:`.Widget`" -msgstr ":class:`.Widget`" - -#: discord.Client.application_info:3 of -msgid "Retrieves the bot's application information." -msgstr "Botのアプリケーション情報を取得します。" - -#: discord.Client.application_info:5 of -#, fuzzy -msgid "Retrieving the information failed somehow." -msgstr ":exc:`.HTTPException` -- 何らかの要因で情報の取得に失敗した。" - -#: discord.Client.application_info:7 of -msgid "The bot's application information." -msgstr "Botのアプリケーション情報。" - -#: discord.Client.application_info:8 of -msgid ":class:`.AppInfo`" -msgstr ":class:`.AppInfo`" - -#: discord.Client.fetch_user:3 of -msgid "" -"Retrieves a :class:`~discord.User` based on their ID. This can only be " -"used by bot accounts. You do not have to share any guilds with the user " -"to get this information, however many operations do require that you do." -msgstr "" -"IDをもとに :class:`~discord.User` " -"を取得します。Botアカウントでのみ使用できます。そのユーザーとギルドを共有する必要はありませんが、操作の多くはそれを必要とします。" - -#: discord.Client.fetch_user:10 of -msgid "" -"This method is an API call. For general usage, consider :meth:`get_user` " -"instead." -msgstr "このメソッドはAPIを呼び出します。通常は :meth:`get_user` を代わりとして使用してください。" - -#: discord.Client.fetch_user:12 of -msgid "The user's ID to fetch from." -msgstr "取得したいユーザーのID。" - -#: discord.Client.fetch_user:15 of -#, fuzzy -msgid "A user with this ID does not exist." -msgstr ":exc:`.NotFound` -- 指定のIDを持つユーザーが存在しない。" - -#: discord.Client.fetch_user:16 of -#, fuzzy -msgid "Fetching the user failed." -msgstr ":exc:`.HTTPException` -- ユーザーの取得に失敗した。" - -#: discord.Client.fetch_user:18 of -msgid "The user you requested." -msgstr "あなたがリクエストしたユーザー。" - -#: discord.Client.fetch_user:19 discord.abc.Messageable:8 discord.abc.User:5 of -msgid ":class:`~discord.User`" -msgstr ":class:`~discord.User`" - -#: discord.Client.fetch_user_profile:3 of -msgid "Gets an arbitrary user's profile." -msgstr "" - -#: discord.Client.fetch_user_profile:7 discord.ClientUser.blocked:5 -#: discord.ClientUser.create_group:9 discord.ClientUser.edit_settings:7 -#: discord.ClientUser.friends:5 discord.ClientUser.get_relationship:5 -#: discord.ClientUser.relationships:5 discord.Member.block:7 -#: discord.Member.is_blocked:5 discord.Member.is_friend:5 -#: discord.Member.mutual_friends:7 discord.Member.profile:7 -#: discord.Member.remove_friend:7 discord.Member.send_friend_request:7 -#: discord.Member.unblock:7 discord.User.block:7 discord.User.is_blocked:5 -#: discord.User.is_friend:5 discord.User.mutual_friends:7 -#: discord.User.profile:7 discord.User.relationship:5 -#: discord.User.remove_friend:7 discord.User.send_friend_request:7 -#: discord.User.unblock:7 of -#, fuzzy -msgid "This can only be used by non-bot accounts." -msgstr "これは非Botアカウントのみに適用されます。" - -#: discord.Client.fetch_user_profile:9 of -msgid "The ID of the user to fetch their profile for." -msgstr "プロフィールを取得したいユーザーのID。" - -#: discord.Client.fetch_user_profile:12 discord.Member.profile:9 -#: discord.User.profile:9 of -#, fuzzy -msgid "Not allowed to fetch profiles." -msgstr ":exc:`.Forbidden` -- プロフィールを取得することが許可されていない。" - -#: discord.Client.fetch_user_profile:13 discord.Member.profile:10 -#: discord.User.profile:10 of -#, fuzzy -msgid "Fetching the profile failed." -msgstr ":exc:`.HTTPException` -- プロフィールの取得に失敗した。" - -#: discord.Client.fetch_user_profile:15 discord.Member.profile:12 -#: discord.User.profile:12 of -msgid "The profile of the user." -msgstr "ユーザーのプロフィール。" - -#: discord.Client.fetch_user_profile:16 of -msgid ":class:`.Profile`" -msgstr ":class:`.Profile`" - -#: discord.Client.fetch_channel:3 of -msgid "" -"Retrieves a :class:`.abc.GuildChannel` or :class:`.abc.PrivateChannel` " -"with the specified ID." -msgstr "" -"指定されたIDを持つ :class:`.abc.GuildChannel` または :class:`.abc.PrivateChannel` " -"を取得します。" - -#: discord.Client.fetch_channel:7 of -msgid "" -"This method is an API call. For general usage, consider " -":meth:`get_channel` instead." -msgstr "このメソッドはAPIを呼び出します。通常は :meth:`get_channel` を代わりとして使用してください。" - -#: discord.Client.fetch_channel:11 discord.Guild.fetch_channels:11 of -#, fuzzy -msgid "An unknown channel type was received from Discord." -msgstr ":exc:`.InvalidData` -- 不明なチャンネルタイプをDiscordから受信した。" - -#: discord.Client.fetch_channel:12 of -#, fuzzy -msgid "Retrieving the channel failed." -msgstr ":exc:`.HTTPException` -- チャンネルの取得に失敗した。" - -#: discord.Client.fetch_channel:13 of -#, fuzzy -msgid "Invalid Channel ID." -msgstr "ボイスチャンネル。" - -#: discord.Client.fetch_channel:14 of -#, fuzzy -msgid "You do not have permission to fetch this channel." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.Client.fetch_channel:16 of -msgid "The channel from the ID." -msgstr "IDから取得したチャンネル。" - -#: discord.Client.fetch_channel:17 of -msgid "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: discord.Client.fetch_webhook:3 of -msgid "Retrieves a :class:`.Webhook` with the specified ID." -msgstr "特定のIDの :class:`.Webhook` を取得します。" - -#: discord.Client.fetch_webhook:5 of -#, fuzzy -msgid "Retrieving the webhook failed." -msgstr ":exc:`.HTTPException` -- Webhookの取得に失敗した。" - -#: discord.Client.fetch_webhook:6 of -msgid "Invalid webhook ID." -msgstr "" - -#: discord.Client.fetch_webhook:7 of -#, fuzzy -msgid "You do not have permission to fetch this webhook." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Client.fetch_webhook:9 of -msgid "The webhook you requested." -msgstr "要求したWebhook。" - -#: discord.Client.fetch_webhook:10 of -msgid ":class:`.Webhook`" -msgstr ":class:`.Webhook`" - -#: discord.AutoShardedClient:1 of -msgid "" -"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." -msgstr "" -"このクライアントは :class:`Client` " -"に似ていますが、管理しやすく、かつ透過的なシングルプロセスのBotに分割するという複雑な処理を行います。" - -#: discord.AutoShardedClient:5 of -msgid "" -"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." -msgstr "" -"このクライアントは、実装に関して内部的に複数のシャードに分割されていても、単一のシャードの通常の :class:`Client` " -"のように使用することができます。これにより、IPCやその他の複雑なインフラストラクチャへの対処を行う必要がなくなります。" - -#: discord.AutoShardedClient:10 of -msgid "" -"It is recommended to use this client only if you have surpassed at least " -"1000 guilds." -msgstr "少なくとも1000を超えるギルドで使用される場合にのみ、このクライアントを使用することをおすすめします。" - -#: discord.AutoShardedClient:13 of -msgid "" -"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." -msgstr "" -":attr:`.shard_count` が指定されていない場合、ライブラリはBot " -"Gatewayのエンドポイント呼び出しを使用して使用するシャードの数を見つけ出します。" - -#: discord.AutoShardedClient:16 of -msgid "" -"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``." -msgstr "" -"``shard_ids`` パラメータが指定されている場合、それらのシャードIDが内部シャードの起動時に使用されます。これを使用する場合 " -":attr:`.shard_count` の指定が必須です。このパラメータを省略した場合は、クライアントは0から ``shard_count - " -"1`` までのシャードを起動します。" - -#: discord.AutoShardedClient:23 of -#, fuzzy -msgid "An optional list of shard_ids to launch the shards with." -msgstr "Optional[List[:class:`int`]] -- シャードの起動時に使用するshard_idsのオプションリスト。" - -#: discord.AutoShardedClient:25 of -msgid "Optional[List[:class:`int`]]" -msgstr "" - -#: discord.AutoShardedClient.latency:3 of -msgid "" -"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." -msgstr "" -"これは :meth:`Client.latency` " -"と同様に機能しますが、すべてのシャードの平均待ち時間を使用する点が異なります。シャードの待ち時間のリストを取得するには " -":attr:`latencies` プロパティを参照してください。準備ができていない場合は ``nan`` を返します。" - -#: discord.AutoShardedClient.latencies:1 of -msgid "A list of latencies between a HEARTBEAT and a HEARTBEAT_ACK in seconds." -msgstr "" - -#: discord.AutoShardedClient.latencies:3 of -msgid "This returns a list of tuples with elements ``(shard_id, latency)``." -msgstr "これは、 ``(shard_id, latency)`` の要素を持つタプルのリストを返します。" - -#: discord.AutoShardedClient.latencies:5 of -msgid "List[Tuple[:class:`int`, :class:`float`]]" -msgstr "" - -#: discord.AutoShardedClient.get_shard:1 of -msgid "" -"Optional[:class:`ShardInfo`]: Gets the shard information at a given shard" -" ID or ``None`` if not found." -msgstr "" - -#: discord.AutoShardedClient.shards:1 of -msgid "Returns a mapping of shard IDs to their respective info object." -msgstr "" - -#: discord.AutoShardedClient.shards:3 of -msgid "Mapping[int, :class:`ShardInfo`]" -msgstr "" - -#: discord.AutoShardedClient.request_offline_members:3 of -msgid "" -"Requests previously offline members from the guild to be filled up into " -"the :attr:`Guild.members` cache. This function is usually not called. It " -"should only be used if you have the ``fetch_offline_members`` parameter " -"set to ``False``." -msgstr "" -"ギルドのオフラインメンバーを :attr:`Guild.members` " -"キャッシュへ書き込むよう要求します。この関数は通常呼び出されることはありません。 ``fetch_offline_members`` パラメータが" -" ``False`` の場合にのみ使用してください。" - -#: discord.AutoShardedClient.request_offline_members:8 of -msgid "" -"When the client logs on and connects to the websocket, Discord does not " -"provide the library with offline members if the number of members in the " -"guild is larger than 250. You can check if a guild is large if " -":attr:`Guild.large` is ``True``." -msgstr "" -"クライアントがWebSocketに接続し、ログインするとき、ギルド内のメンバー数が250よりも大きいならば、Discordはライブラリにオフラインメンバーを提供しません。" -" :attr:`Guild.large` が ``True`` かどうかでギルドが大きいかどうかを確認することができます。" - -#: discord.AutoShardedClient.change_presence:5 of -msgid "Example: ::" -msgstr "例: ::" - -#: discord.AutoShardedClient.change_presence:12 of -msgid "" -"Indicates what status to change to. If ``None``, then " -":attr:`Status.online` is used." -msgstr "変更するステータスを示します。 ``None`` の場合、 :attr:`Status.online` となります。" - -#: discord.AutoShardedClient.change_presence:19 of -msgid "" -"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." -msgstr "" -"プレゼンスを変更したいシャードのshard_id。指定されていない、または ``None`` " -"が渡された場合はBotがアクセスできるすべてのシャードのプレゼンスが変更されます。" - -#: discord.AutoShardedClient.change_presence:24 of -#, fuzzy -msgid "If the ``activity`` parameter is not of proper type." -msgstr ":exc:`InvalidArgument` -- ``activity`` に渡された値が適切な型でない。" - -#: discord.AppInfo:1 of -msgid "Represents the application info for the bot provided by Discord." -msgstr "Discordが提供するBotのアプリケーション情報を表します。" - -#: discord.AppInfo:6 of -#, fuzzy -msgid "The application ID." -msgstr "Botのアプリケーション情報。" - -#: ../../api.rst:2238 ../../api.rst:2244 ../../api.rst:2289 ../../api.rst:2303 -#: ../../api.rst:2331 ../../api.rst:2443 ../../api.rst:2451 ../../api.rst:2459 -#: ../../api.rst:2480 ../../api.rst:2497 discord.Activity:16 discord.AppInfo:8 -#: discord.Asset.save:15 discord.Attachment:7 discord.Attachment:13 -#: discord.Attachment.save:24 discord.AuditLogEntry:22 -#: discord.CategoryChannel:39 discord.CategoryChannel:46 discord.ClientUser:31 -#: discord.Colour:28 discord.Colour.b:3 discord.Colour.g:3 discord.Colour.r:3 -#: discord.ConnectionClosed:8 discord.DMChannel:37 discord.Emoji:39 -#: discord.Emoji:63 discord.GroupChannel:37 discord.Guild:46 discord.Guild:64 -#: discord.Guild:70 discord.Guild:124 discord.Guild:178 discord.Guild:184 -#: discord.Guild.emoji_limit:3 discord.Guild.estimate_pruned_members:15 -#: discord.Guild.filesize_limit:3 discord.Guild.member_count:8 -#: discord.Guild.shard_id:3 discord.HTTPException:21 discord.HTTPException:27 -#: discord.Integration:9 discord.Integration:63 discord.IntegrationAccount:9 -#: discord.Intents:37 discord.Invite:50 discord.Invite:87 discord.Invite:93 -#: discord.MemberCacheFlags:40 discord.Message:112 discord.MessageFlags:29 -#: discord.MessageReference:15 discord.Object:32 -#: discord.PartialInviteChannel:34 discord.PartialInviteGuild:34 -#: discord.Permissions:46 discord.PublicUserFlags:28 -#: discord.RawBulkMessageDeleteEvent:13 discord.RawMessageDeleteEvent:7 -#: discord.RawMessageDeleteEvent:19 discord.RawMessageUpdateEvent:7 -#: discord.RawMessageUpdateEvent:15 discord.RawReactionActionEvent:8 -#: discord.RawReactionActionEvent:14 discord.RawReactionActionEvent:20 -#: discord.RawReactionClearEmojiEvent:9 discord.RawReactionClearEmojiEvent:15 -#: discord.RawReactionClearEvent:7 discord.RawReactionClearEvent:13 -#: discord.Reaction:36 discord.Role:41 discord.Role:66 discord.ShardInfo:12 -#: discord.SystemChannelFlags:32 discord.Team:7 discord.Team:25 -#: discord.TeamMember:33 discord.Template:15 discord.TextChannel:37 -#: discord.TextChannel:56 discord.TextChannel:72 discord.User:31 -#: discord.VoiceChannel:37 discord.VoiceChannel:50 discord.VoiceChannel:56 -#: discord.VoiceChannel:62 discord.Webhook:62 discord.Widget:21 -#: discord.WidgetChannel:25 discord.WidgetChannel:37 discord.WidgetMember:25 -#: discord.abc.GuildChannel:28 discord.abc.Snowflake:13 -#: discord.opus.OpusError:7 of -msgid ":class:`int`" -msgstr "" - -#: discord.AppInfo:12 of -#, fuzzy -msgid "The application name." -msgstr ":class:`str` -- アプリケーションの名前。" - -#: ../../api.rst:2186 ../../api.rst:2192 ../../api.rst:2198 ../../api.rst:2297 -#: ../../api.rst:2323 ../../api.rst:2418 ../../api.rst:2488 discord.Activity:22 -#: discord.Activity:28 discord.Activity:40 discord.Activity:46 -#: discord.AppInfo:14 discord.AppInfo:69 discord.AppInfo:77 -#: discord.Attachment:31 discord.Attachment:38 discord.Attachment:46 -#: discord.CategoryChannel:27 discord.CategoryChannel.mention:3 -#: discord.ClientUser:25 discord.ClientUser:37 -#: discord.ClientUser.display_name:7 discord.ClientUser.mention:3 -#: discord.ConnectionClosed:14 discord.Embed:24 discord.Embed:31 -#: discord.Embed:38 discord.Embed:45 discord.Emoji:33 discord.Game:34 -#: discord.Guild:27 discord.Guild:199 discord.HTTPException:15 -#: discord.Integration:15 discord.Integration:27 discord.IntegrationAccount:15 -#: discord.Invite:56 discord.Invite.id:3 discord.Invite.url:3 -#: discord.Member.display_name:7 discord.Member.mention:3 -#: discord.Member.raw_status:5 discord.Message:31 -#: discord.Message.clean_content:15 discord.Message.jump_url:3 -#: discord.Message.system_content:8 discord.PartialInviteChannel:28 -#: discord.PartialInviteChannel.mention:3 discord.PartialInviteGuild:28 -#: discord.RawReactionActionEvent:50 discord.Role:47 discord.Role.mention:3 -#: discord.Spotify.album:3 discord.Spotify.album_cover_url:3 -#: discord.Spotify.artist:6 discord.Spotify.name:3 discord.Spotify.party_id:3 -#: discord.Spotify.title:3 discord.Spotify.track_id:3 discord.Streaming:29 -#: discord.Streaming:55 discord.Team:13 discord.TeamMember:27 -#: discord.TeamMember:39 discord.Template:9 discord.Template:21 -#: discord.Template:27 discord.TextChannel:25 discord.TextChannel.mention:3 -#: discord.User:25 discord.User:37 discord.User.display_name:7 -#: discord.User.mention:3 discord.VoiceChannel:25 -#: discord.VoiceChannel.mention:3 discord.VoiceClient:17 discord.VoiceClient:23 -#: discord.VoiceClient:29 discord.Webhook.url:3 discord.Widget:27 -#: discord.Widget.json_url:3 discord.WidgetChannel:31 -#: discord.WidgetChannel.mention:3 discord.WidgetMember:31 -#: discord.WidgetMember:37 discord.WidgetMember.display_name:3 -#: discord.WidgetMember.mention:3 discord.abc.GuildChannel:15 -#: discord.abc.GuildChannel.mention:3 discord.abc.User:15 discord.abc.User:21 -#: discord.abc.User.display_name:3 discord.abc.User.mention:3 -#: discord.utils.escape_markdown:18 discord.utils.escape_mentions:17 -#: discord.utils.oauth_url:15 discord.utils.resolve_invite:7 -#: discord.utils.resolve_template:9 of -msgid ":class:`str`" -msgstr ":class:`str`" - -#: discord.AppInfo:18 of -#, fuzzy -msgid "The application owner." -msgstr ":class:`User` -- アプリケーションの所有者。" - -#: ../../api.rst:864 ../../api.rst:2435 discord.AppInfo:20 discord.DMChannel:25 -#: discord.GroupChannel:43 discord.Integration:69 discord.Invite:99 -#: discord.Relationship:10 discord.Template:33 of -#, fuzzy -msgid ":class:`User`" -msgstr ":class:`str`" - -#: discord.AppInfo:24 of -#, fuzzy -msgid "The application's team." -msgstr ":class:`str` -- アプリケーションの名前。" - -#: discord.AppInfo:28 of -msgid "Optional[:class:`Team`]" -msgstr "" - -#: discord.AppInfo:32 discord.Team:17 of -#, fuzzy -msgid "The icon hash, if it exists." -msgstr "Optional[:class:`str`] -- アイコンのハッシュ。(存在する場合)" - -#: ../../api.rst:2361 discord.Activity.large_image_text:3 -#: discord.Activity.large_image_url:3 discord.Activity.small_image_text:3 -#: discord.Activity.small_image_url:3 discord.AppInfo:34 discord.AppInfo:40 -#: discord.AppInfo:104 discord.AppInfo:113 discord.AuditLogEntry:35 -#: discord.ClientUser:43 discord.ClientUser:69 discord.ClientUser:75 -#: discord.CustomActivity:27 discord.File:30 discord.GroupChannel:49 -#: discord.GroupChannel:55 discord.Guild:58 discord.Guild:110 discord.Guild:116 -#: discord.Guild:171 discord.Guild:191 discord.Member:48 -#: discord.PartialEmoji:32 discord.PartialInviteGuild:52 -#: discord.PartialInviteGuild:58 discord.PartialInviteGuild:64 -#: discord.PartialInviteGuild:70 discord.Streaming:35 discord.Streaming:41 -#: discord.Streaming:49 discord.Streaming.twitch_name:6 discord.Team:19 -#: discord.TeamMember:45 discord.TextChannel:49 discord.User:43 -#: discord.Webhook:77 discord.Webhook:102 discord.Webhook:108 -#: discord.Widget.invite_url:3 discord.WidgetMember:55 discord.WidgetMember:61 -#: discord.abc.User:27 of -#, fuzzy -msgid "Optional[:class:`str`]" -msgstr ":class:`str`" - -#: discord.AppInfo:38 of -#, fuzzy -msgid "The application description." -msgstr "Optional[:class:`str`] -- アプリケーションの説明。" - -#: discord.AppInfo:44 of -#, fuzzy -msgid "" -"Whether the bot can be invited by anyone or if it is locked to the " -"application owner." -msgstr ":class:`bool` -- 誰でもBotを招待することができるか、それともアプリケーション所有者のみに限定されているか。" - -#: ../../api.rst:869 ../../api.rst:883 ../../api.rst:888 ../../api.rst:893 -#: ../../api.rst:898 ../../api.rst:903 ../../api.rst:915 ../../api.rst:923 -#: ../../api.rst:2250 ../../api.rst:2369 ../../api.rst:2377 ../../api.rst:2402 -#: ../../api.rst:2410 ../../api.rst:2467 discord.AllowedMentions:11 -#: discord.AppInfo:47 discord.AppInfo:54 discord.CallMessage.call_ended:3 -#: discord.CategoryChannel.permissions_synced:8 discord.ClientUser:49 -#: discord.ClientUser:57 discord.ClientUser:63 discord.ClientUser:81 -#: discord.ClientUser:87 discord.ClientUser.mentioned_in:7 discord.Emoji:45 -#: discord.Emoji:51 discord.Emoji:57 discord.Emoji:69 discord.File:36 -#: discord.GroupCall:15 discord.Guild:80 discord.Guild.chunked:9 -#: discord.Guild.large:6 discord.Integration:33 discord.Integration:39 -#: discord.Intents.bans:10 discord.Intents.dm_messages:25 -#: discord.Intents.dm_reactions:18 discord.Intents.dm_typing:11 -#: discord.Intents.emojis:14 discord.Intents.guild_messages:24 -#: discord.Intents.guild_reactions:18 discord.Intents.guild_typing:11 -#: discord.Intents.guilds:23 discord.Intents.integrations:9 -#: discord.Intents.invites:10 discord.Intents.members:31 -#: discord.Intents.messages:25 discord.Intents.presences:20 -#: discord.Intents.reactions:18 discord.Intents.typing:11 -#: discord.Intents.voice_states:13 discord.Intents.webhooks:9 discord.Invite:68 -#: discord.Invite:81 discord.Member.mentioned_in:7 -#: discord.MemberCacheFlags.joined:8 discord.MemberCacheFlags.online:8 -#: discord.MemberCacheFlags.voice:7 discord.Message:11 discord.Message:78 -#: discord.Message:131 discord.MessageFlags.crossposted:3 -#: discord.MessageFlags.is_crossposted:3 -#: discord.MessageFlags.source_message_deleted:3 -#: discord.MessageFlags.suppress_embeds:3 discord.MessageFlags.urgent:5 -#: discord.PartialEmoji:38 discord.PermissionOverwrite.is_empty:7 -#: discord.Permissions.add_reactions:3 discord.Permissions.administrator:5 -#: discord.Permissions.attach_files:3 discord.Permissions.ban_members:3 -#: discord.Permissions.change_nickname:3 discord.Permissions.connect:3 -#: discord.Permissions.create_instant_invite:3 -#: discord.Permissions.deafen_members:3 discord.Permissions.embed_links:3 -#: discord.Permissions.external_emojis:3 discord.Permissions.kick_members:3 -#: discord.Permissions.manage_channels:5 discord.Permissions.manage_emojis:3 -#: discord.Permissions.manage_guild:3 discord.Permissions.manage_messages:7 -#: discord.Permissions.manage_nicknames:3 -#: discord.Permissions.manage_permissions:5 discord.Permissions.manage_roles:5 -#: discord.Permissions.manage_webhooks:3 discord.Permissions.mention_everyone:3 -#: discord.Permissions.move_members:3 discord.Permissions.mute_members:3 -#: discord.Permissions.priority_speaker:3 -#: discord.Permissions.read_message_history:3 -#: discord.Permissions.read_messages:3 discord.Permissions.send_messages:3 -#: discord.Permissions.send_tts_messages:3 discord.Permissions.speak:3 -#: discord.Permissions.stream:3 discord.Permissions.use_external_emojis:5 -#: discord.Permissions.use_voice_activation:3 -#: discord.Permissions.view_audit_log:3 discord.Permissions.view_channel:5 -#: discord.Permissions.view_guild_insights:5 -#: discord.PublicUserFlags.bug_hunter:3 -#: discord.PublicUserFlags.bug_hunter_level_2:3 -#: discord.PublicUserFlags.early_supporter:3 -#: discord.PublicUserFlags.early_verified_bot_developer:5 -#: discord.PublicUserFlags.hypesquad:3 -#: discord.PublicUserFlags.hypesquad_balance:3 -#: discord.PublicUserFlags.hypesquad_bravery:3 -#: discord.PublicUserFlags.hypesquad_brilliance:3 -#: discord.PublicUserFlags.partner:3 discord.PublicUserFlags.staff:3 -#: discord.PublicUserFlags.system:3 discord.PublicUserFlags.team_user:3 -#: discord.PublicUserFlags.verified_bot:3 -#: discord.PublicUserFlags.verified_bot_developer:3 discord.Reaction:42 -#: discord.Reaction.custom_emoji:3 discord.Role:59 discord.Role:73 -#: discord.Role:79 discord.SystemChannelFlags.join_notifications:3 -#: discord.SystemChannelFlags.premium_subscriptions:3 discord.TeamMember:51 -#: discord.TextChannel.permissions_synced:8 discord.User:49 discord.User:55 -#: discord.User.mentioned_in:7 discord.VoiceChannel.permissions_synced:8 -#: discord.VoiceState:7 discord.VoiceState:13 discord.VoiceState:19 -#: discord.VoiceState:25 discord.VoiceState:33 discord.VoiceState:39 -#: discord.VoiceState:45 discord.WidgetMember:43 -#: discord.WidgetMember.mentioned_in:7 -#: discord.abc.GuildChannel.permissions_synced:8 discord.abc.User:33 -#: discord.opus.is_loaded:7 of -msgid ":class:`bool`" -msgstr ":class:`bool`" - -#: discord.AppInfo:51 of -#, fuzzy -msgid "" -"Whether the bot requires the completion of the full oauth2 code grant " -"flow to join." -msgstr ":class:`bool` -- Botの参加に、完全なOAuth2認可コードフローの完了を必要とするかどうか。" - -#: discord.AppInfo:58 of -msgid "A list of RPC origin URLs, if RPC is enabled." -msgstr "" - -#: discord.AppInfo:60 of -#, fuzzy -msgid "Optional[List[:class:`str`]]" -msgstr ":class:`str`" - -#: discord.AppInfo:64 of -msgid "" -"If this application is a game sold on Discord, this field will be the " -"summary field for the store page of its primary SKU" -msgstr "" - -#: discord.AppInfo:73 of -msgid "The base64 encoded key for the GameSDK's GetTicket" -msgstr "" - -#: discord.AppInfo:81 discord.AppInfo.guild:1 of -msgid "" -"If this application is a game sold on Discord, this field will be the " -"guild to which it has been linked" -msgstr "" - -#: discord.AppInfo:86 discord.AppInfo:95 discord.Attachment:19 -#: discord.Attachment:25 discord.ConnectionClosed:20 discord.Guild:86 -#: discord.Guild:96 discord.Guild:104 discord.Guild.prune_members:38 -#: discord.Invite:105 discord.Invite:112 discord.Message:119 -#: discord.MessageReference:9 discord.MessageReference:21 -#: discord.PartialEmoji:44 discord.PrivilegedIntentsRequired:14 -#: discord.RawBulkMessageDeleteEvent:19 discord.RawMessageDeleteEvent:13 -#: discord.RawReactionActionEvent:26 discord.RawReactionClearEmojiEvent:21 -#: discord.RawReactionClearEvent:19 discord.ShardInfo:18 discord.TextChannel:43 -#: discord.TextChannel:63 discord.VoiceChannel:43 discord.Webhook:83 -#: discord.Webhook:89 of -msgid "Optional[:class:`int`]" -msgstr "" - -#: discord.AppInfo:90 of -msgid "" -"If this application is a game sold on Discord, this field will be the id " -"of the \"Game SKU\" that is created, if exists" -msgstr "" - -#: discord.AppInfo:99 of -msgid "" -"If this application is a game sold on Discord, this field will be the URL" -" slug that links to the store page" -msgstr "" - -#: discord.AppInfo:108 of -msgid "" -"If this application is a game sold on Discord, this field will be the " -"hash of the image on store embeds" -msgstr "" - -#: discord.AppInfo.icon_url:1 of -#, fuzzy -msgid "Retrieves the application's icon asset." -msgstr ":class:`.Asset` -- アプリケーションのアイコンアセット。" - -#: discord.AppInfo.cover_image_url:5 discord.AppInfo.icon_url:5 -#: discord.Team.icon_url:3 of -#, fuzzy -msgid ":class:`.Asset`" -msgstr ":class:`str`" - -#: discord.AppInfo.cover_image_url:1 of -msgid "Retrieves the cover image on a store embed." -msgstr "" - -#: discord.AppInfo.guild:6 discord.Message.guild:3 discord.VoiceClient.guild:3 -#: discord.Webhook.guild:5 of -#, fuzzy -msgid "Optional[:class:`Guild`]" -msgstr ":class:`.Guild`" - -#: discord.Team:1 of -#, fuzzy -msgid "Represents an application team for a bot provided by Discord." -msgstr "Discordが提供するBotのアプリケーション情報を表します。" - -#: discord.Team:5 of -#, fuzzy -msgid "The team ID." -msgstr "アムステルダムリージョン。" - -#: discord.Team:11 of -msgid "The team name" -msgstr "" - -#: discord.Team:23 of -msgid "The team's owner ID." -msgstr "" - -#: discord.Team:29 of -msgid "A list of the members in the team" -msgstr "" - -#: discord.Team:33 of -msgid "List[:class:`TeamMember`]" -msgstr "" - -#: discord.Team.icon_url:1 of -#, fuzzy -msgid "Retrieves the team's icon asset." -msgstr "Botのアプリケーション情報を取得します。" - -#: discord.Team.owner:1 of -msgid "The team's owner." -msgstr "" - -#: discord.Team.owner:3 of -msgid "Optional[:class:`TeamMember`]" -msgstr "" - -#: discord.TeamMember:1 of -#, fuzzy -msgid "Represents a team member in a team." -msgstr "オーディオストリームを表します。" - -#: discord.TeamMember:7 of -#, fuzzy -msgid "Checks if two team members are equal." -msgstr "二つのユーザーが等しいかを比較します。" - -#: discord.TeamMember:11 of -#, fuzzy -msgid "Checks if two team members are not equal." -msgstr "二つのユーザーが等しいものではないか比較します。" - -#: discord.TeamMember:15 of -#, fuzzy -msgid "Return the team member's hash." -msgstr "ユーザーのハッシュ値を返します。" - -#: discord.TeamMember:19 of -#, fuzzy -msgid "Returns the team member's name with discriminator." -msgstr "ユーザー名とディスクリミネータを返します。" - -#: discord.TeamMember:25 of -#, fuzzy -msgid "The team member's username." -msgstr "更新されたメンバーの更新後情報。" - -#: discord.TeamMember:31 of -#, fuzzy -msgid "The team member's unique ID." -msgstr "更新されたメンバーの更新後情報。" - -#: discord.TeamMember:37 of -#, fuzzy -msgid "" -"The team member's discriminator. This is given when the username has " -"conflicts." -msgstr ":class:`str` -- ユーザーの識別子。これはユーザー名が重複しているときに与えられます。" - -#: discord.TeamMember:43 of -#, fuzzy -msgid "The avatar hash the team member has. Could be None." -msgstr "Optional[:class:`str`] -- ユーザーのアバターハッシュ。 Noneが返る場合もあります。" - -#: discord.ClientUser:47 discord.TeamMember:49 discord.User:47 of -#, fuzzy -msgid "Specifies if the user is a bot account." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.TeamMember:55 of -#, fuzzy -msgid "The team that the member is from." -msgstr "メンションが削除されたテキスト。" - -#: discord.TeamMember:57 of -#, fuzzy -msgid ":class:`Team`" -msgstr ":class:`bytes`" - -#: discord.TeamMember:61 of -msgid "The membership state of the member (e.g. invited or accepted)" -msgstr "" - -#: discord.TeamMember:63 of -msgid ":class:`TeamMembershipState`" -msgstr "" - -#: ../../api.rst:52 -msgid "Voice" -msgstr "ボイス" - -#: discord.VoiceClient:1 of -msgid "Represents a Discord voice connection." -msgstr "Discordの音声接続を表します。" - -#: discord.VoiceClient:3 of -msgid "" -"You do not create these, you typically get them from e.g. " -":meth:`VoiceChannel.connect`." -msgstr "これを意図的に生成することはできません。通常、 :meth:`VoiceChannel.connect` などを使用した際に、取得できます。" - -#: discord.VoiceClient:8 of -msgid "" -"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." -msgstr "" - -#: discord.VoiceClient:15 of -#, fuzzy -msgid "The voice connection session ID." -msgstr ":class:`str` -- 音声接続のセッションID。" - -#: discord.VoiceClient:21 of -#, fuzzy -msgid "The voice connection token." -msgstr ":class:`str` -- 音声接続のトークン." - -#: discord.VoiceClient:27 of -#, fuzzy -msgid "The endpoint we are connecting to." -msgstr ":class:`str` -- 接続先のエンドポイント。" - -#: discord.VoiceClient:33 of -#, fuzzy -msgid "The voice channel connected to." -msgstr ":class:`abc.Connectable` -- 接続しているボイスチャンネル。" - -#: discord.VoiceClient:35 of -#, fuzzy -msgid ":class:`abc.Connectable`" -msgstr ":class:`.Invite`" - -#: discord.VoiceClient:39 of -#, fuzzy -msgid "The event loop that the voice client is running on." -msgstr ":class:`asyncio.AbstractEventLoop` -- ボイスクライアントが実行されているイベントループ。" - -#: discord.VoiceClient.guild:1 of -#, fuzzy -msgid "The guild we're connected to, if applicable." -msgstr "Optional[:class:`Guild`] -- 存在する場合は、接続しているギルドを返します。" - -#: discord.VoiceClient.user:1 of -#, fuzzy -msgid "The user connected to voice (i.e. ourselves)." -msgstr ":class:`ClientUser` -- ボイスチャンネルに接続しているユーザー。(つまり、自分自身)" - -#: discord.DMChannel:31 discord.GroupChannel:31 discord.VoiceClient.user:3 of -#, fuzzy -msgid ":class:`ClientUser`" -msgstr ":class:`~discord.ClientUser`" - -#: discord.VoiceClient.on_voice_state_update:3 -#: discord.VoiceProtocol.on_voice_state_update:3 of -msgid "" -"An abstract method that is called when the client's voice state has " -"changed. This corresponds to ``VOICE_STATE_UPDATE``." -msgstr "" - -#: discord.VoiceClient.on_voice_state_update:6 -#: discord.VoiceProtocol.on_voice_state_update:6 of -msgid "" -"The raw `voice state payload`__. .. _voice_state_update_payload: " -"https://discord.com/developers/docs/resources/voice#voice-state-object " -"__ voice_state_update_payload_" -msgstr "" - -#: discord.VoiceClient.on_voice_state_update:6 -#: discord.VoiceProtocol.on_voice_state_update:6 of -#, fuzzy -msgid "The raw `voice state payload`__." -msgstr "生のイベントペイロードデータ。" - -#: discord.VoiceClient.on_voice_server_update:3 -#: discord.VoiceProtocol.on_voice_server_update:3 of -msgid "" -"An abstract method that is called when initially connecting to voice. " -"This corresponds to ``VOICE_SERVER_UPDATE``." -msgstr "" - -#: discord.VoiceClient.on_voice_server_update:6 -#: discord.VoiceProtocol.on_voice_server_update:6 of -msgid "" -"The raw `voice server update payload`__. .. " -"_voice_server_update_payload: " -"https://discord.com/developers/docs/topics/gateway#voice-server-update-" -"voice-server-update-event-fields __ voice_server_update_payload_" -msgstr "" - -#: discord.VoiceClient.on_voice_server_update:6 -#: discord.VoiceProtocol.on_voice_server_update:6 of -msgid "The raw `voice server update payload`__." -msgstr "" - -#: discord.VoiceClient.connect:3 discord.VoiceProtocol.connect:3 of -msgid "" -"An abstract method called when the client initiates the connection " -"request." -msgstr "" - -#: discord.VoiceClient.connect:5 discord.VoiceProtocol.connect:5 of -msgid "" -"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." -msgstr "" - -#: discord.VoiceClient.connect:9 discord.VoiceProtocol.connect:9 of -msgid "" -"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." -msgstr "" - -#: discord.VoiceClient.connect:14 discord.VoiceProtocol.connect:14 of -msgid "The timeout for the connection." -msgstr "" - -#: discord.VoiceClient.connect:16 discord.VoiceProtocol.connect:16 of -#, fuzzy -msgid "Whether reconnection is expected." -msgstr "Discordとの接続を閉じます。" - -#: discord.VoiceClient.latency:1 of -msgid "Latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds." -msgstr "" - -#: discord.VoiceClient.latency:3 of -msgid "" -"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." -msgstr "" - -#: discord.VoiceClient.average_latency:1 of -msgid "Average of most recent 20 HEARTBEAT latencies in seconds." -msgstr "" - -#: discord.VoiceClient.disconnect:3 of -msgid "Disconnects this voice client from voice." -msgstr "ボイスクライアントをボイスチャンネルから切断します。" - -#: discord.VoiceClient.move_to:3 of -msgid "Moves you to a different voice channel." -msgstr "別のボイスチャンネルへ移動させます。" - -#: discord.VoiceClient.move_to:5 of -msgid "The channel to move to. Must be a voice channel." -msgstr "移動先のチャンネル。ボイスチャンネルである必要があります。" - -#: discord.VoiceClient.is_connected:1 of -msgid "Indicates if the voice client is connected to voice." -msgstr "ボイスチャンネルに接続しているかどうかを表します。" - -#: discord.VoiceClient.play:1 of -msgid "Plays an :class:`AudioSource`." -msgstr ":class:`AudioSource` を再生します。" - -#: discord.VoiceClient.play:3 of -msgid "" -"The finalizer, ``after`` is called after the source has been exhausted or" -" an error occurred." -msgstr "ファイナライザーである ``after`` はソースがなくなったか、エラーが発生した後に呼び出されます。" - -#: discord.VoiceClient.play:6 of -#, fuzzy -msgid "" -"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 displayed as if it were raised." -msgstr "オーディオプレイヤーの実行中にエラーが発生した場合、例外はキャッチされ、プレイヤーは停止します。" - -#: discord.VoiceClient.play:10 of -msgid "The audio source we're reading from." -msgstr "読み込むオーディオソース。" - -#: discord.VoiceClient.play:12 of -#, fuzzy -msgid "" -"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." -msgstr "" -"ファイナライザーはストリームが空になると呼び出されます。発生した例外はすべて破棄されます。この関数には再生中に発生したオプションの例外を表す一つのパラメータ" -" ``error`` が必要です。" - -#: discord.VoiceClient.play:17 of -#, fuzzy -msgid "Already playing audio or not connected." -msgstr ":exc:`ClientException` -- すでにオーディオを再生しているか、VCに接続していない。" - -#: discord.VoiceClient.play:18 of -#, fuzzy -msgid "Source is not a :class:`AudioSource` or after is not a callable." -msgstr ":exc:`TypeError` -- sourceが :class:`AudioSource` でないか、afterが呼び出し可能でない。" - -#: discord.VoiceClient.play:19 of -msgid "Source is not opus encoded and opus is not loaded." -msgstr "" - -#: discord.VoiceClient.is_playing:1 of -msgid "Indicates if we're currently playing audio." -msgstr "現在オーディオを再生しているかを表します。" - -#: discord.VoiceClient.is_paused:1 of -msgid "Indicates if we're playing audio, but if we're paused." -msgstr "再生中のオーディオを一時停止しているかを表します。" - -#: discord.VoiceClient.stop:1 of -msgid "Stops playing audio." -msgstr "音声の再生を停止します。" - -#: discord.VoiceClient.pause:1 of -msgid "Pauses the audio playing." -msgstr "音声の再生を一時的に停止します。" - -#: discord.VoiceClient.resume:1 of -msgid "Resumes the audio playing." -msgstr "音声の再生を再開します。" - -#: discord.VoiceClient.source:1 of -#, fuzzy -msgid "The audio source being played, if playing." -msgstr "Optional[:class:`AudioSource`] -- 再生中の場合、再生しているオーディオソースを返します。" - -#: discord.VoiceClient.source:3 of -msgid "" -"This property can also be used to change the audio source currently being" -" played." -msgstr "このプロパティは現在再生しているオーディオソースの変更にも使うことが出来ます。" - -#: discord.VoiceClient.source:5 of -#, fuzzy -msgid "Optional[:class:`AudioSource`]" -msgstr ":class:`AudioSource` を再生します。" - -#: discord.VoiceClient.send_audio_packet:1 of -msgid "Sends an audio packet composed of the data." -msgstr "データで構成されるオーディオパケットを送信します。" - -#: discord.VoiceClient.send_audio_packet:3 of -msgid "You must be connected to play audio." -msgstr "オーディオを再生するには、ボイスチャンネルに接続している必要があります。" - -#: discord.VoiceClient.send_audio_packet:5 of -msgid "The :term:`py:bytes-like object` denoting PCM or Opus voice data." -msgstr "PCM、またはOpusボイスデータを表す :term:`py:bytes-like object` 。" - -#: discord.VoiceClient.send_audio_packet:7 of -msgid "Indicates if ``data`` should be encoded into Opus." -msgstr "``data`` をOpusにエンコードする必要があるかを表します。" - -#: discord.VoiceClient.send_audio_packet:10 of -#, fuzzy -msgid "You are not connected." -msgstr ":exc:`ClientException` -- ボイスチャンネルに接続していない。" - -#: discord.VoiceClient.send_audio_packet:11 of -#, fuzzy -msgid "Encoding the data failed." -msgstr ":exc:`opus.OpusError` -- dataのエンコードに失敗した。" - -#: discord.VoiceProtocol:1 of -#, fuzzy -msgid "A class that represents the Discord voice protocol." -msgstr "Discordの音声接続を表します。" - -#: discord.VoiceProtocol:3 of -msgid "" -"This is an abstract class. The library provides a concrete implementation" -" under :class:`VoiceClient`." -msgstr "" - -#: discord.VoiceProtocol:6 of -msgid "" -"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." -msgstr "" - -#: discord.VoiceProtocol:9 of -msgid "These classes are passed to :meth:`abc.Connectable.connect`." -msgstr "" - -#: discord.VoiceProtocol:13 of -msgid "The client (or its subclasses) that started the connection request." -msgstr "" - -#: discord.VoiceProtocol:15 of -#, fuzzy -msgid "The voice channel that is being connected to." -msgstr "ピン留めが更新されたプライベートチャンネル。" - -#: discord.VoiceProtocol.disconnect:3 of -msgid "An abstract method called when the client terminates the connection." -msgstr "" - -#: discord.VoiceProtocol.disconnect:5 of -msgid "See :meth:`cleanup`." -msgstr "" - -#: discord.VoiceProtocol.disconnect:7 of -#, fuzzy -msgid "Whether the disconnection was forced." -msgstr "Discordとの接続を閉じます。" - -#: discord.VoiceProtocol.cleanup:1 of -msgid "" -"This method *must* be called to ensure proper clean-up during a " -"disconnect." -msgstr "" - -#: discord.VoiceProtocol.cleanup:3 of -msgid "" -"It is advisable to call this from within :meth:`disconnect` when you are " -"completely done with the voice protocol instance." -msgstr "" - -#: discord.VoiceProtocol.cleanup:6 of -msgid "" -"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." -msgstr "" - -#: discord.AudioSource:1 of -msgid "Represents an audio stream." -msgstr "オーディオストリームを表します。" - -#: discord.AudioSource:3 of -msgid "" -"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." -msgstr "オーディオストリームはOpusにエンコードされていなくても構いませんが、エンコードされていない場合、オーディオフォーマットは16ビットの48KHzステレオPCMである必要があります。" - -#: discord.AudioSource:8 of -msgid "The audio source reads are done in a separate thread." -msgstr "オーディオソースの読み込みは別スレッドで行われます。" - -#: discord.AudioSource.read:1 discord.FFmpegOpusAudio.read:1 -#: discord.FFmpegPCMAudio.read:1 discord.PCMAudio.read:1 -#: discord.PCMVolumeTransformer.read:1 of -msgid "Reads 20ms worth of audio." -msgstr "20ms分のオーディオを読み込みます。" - -#: discord.AsyncWebhookAdapter.handle_execution_response:7 -#: discord.AsyncWebhookAdapter.request:3 discord.AudioSource.read:3 -#: discord.FFmpegOpusAudio.read:3 discord.FFmpegPCMAudio.read:3 -#: discord.PCMAudio.read:3 discord.PCMVolumeTransformer.read:3 -#: discord.RequestsWebhookAdapter.handle_execution_response:7 -#: discord.RequestsWebhookAdapter.request:3 -#: discord.WebhookAdapter.handle_execution_response:7 -#: discord.WebhookAdapter.request:3 of -msgid "Subclasses must implement this." -msgstr "サブクラスはこれを実装する必要があります。" - -#: discord.AudioSource.read:5 discord.FFmpegOpusAudio.read:5 -#: discord.FFmpegPCMAudio.read:5 discord.PCMAudio.read:5 -#: discord.PCMVolumeTransformer.read:5 of -msgid "" -"If the audio is complete, then returning an empty :term:`py:bytes-like " -"object` to signal this is the way to do so." -msgstr "オーディオの読み取りが終了すると、空の :term:`py:bytes-like object` を返してこれを通知します。" - -#: discord.AudioSource.read:8 discord.FFmpegOpusAudio.read:8 -#: discord.FFmpegPCMAudio.read:8 discord.PCMAudio.read:8 -#: discord.PCMVolumeTransformer.read:8 of -msgid "" -"If :meth:`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)." -msgstr "" -":meth:`is_opus` が ``True`` " -"を返す場合、20ms分のOpusにエンコードされたオーディオを返さなければいけません。それ以外の場合は、フレームあたり約3,840バイトの20ms相当の16ビット48KHzステレオPCM(20ms分のオーディオ)が必要です。" - -#: discord.AudioSource.read:13 discord.FFmpegOpusAudio.read:13 -#: discord.FFmpegPCMAudio.read:13 discord.PCMAudio.read:13 -#: discord.PCMVolumeTransformer.read:13 of -msgid "A bytes like object that represents the PCM or Opus data." -msgstr "PCMまたはOpusデータを表すバイトライクオブジェクト。" - -#: discord.Asset.read:18 discord.Attachment.read:20 discord.AudioSource.read:14 -#: discord.FFmpegOpusAudio.read:14 discord.FFmpegPCMAudio.read:14 -#: discord.PCMAudio.read:14 discord.PCMVolumeTransformer.read:14 of -msgid ":class:`bytes`" -msgstr ":class:`bytes`" - -#: discord.AudioSource.is_opus:1 discord.FFmpegOpusAudio.is_opus:1 -#: discord.FFmpegPCMAudio.is_opus:1 of -msgid "Checks if the audio source is already encoded in Opus." -msgstr "オーディオソースがOpusにエンコードされているかを表します。" - -#: discord.AudioSource.cleanup:1 discord.FFmpegAudio.cleanup:1 -#: discord.PCMVolumeTransformer.cleanup:1 of -msgid "Called when clean-up is needed to be done." -msgstr "クリーンアップが必要な時に呼び出されます。" - -#: discord.AudioSource.cleanup:3 discord.FFmpegAudio.cleanup:3 -#: discord.PCMVolumeTransformer.cleanup:3 of -msgid "" -"Useful for clearing buffer data or processes after it is done playing " -"audio." -msgstr "オーディオの再生が終了した後にバッファデータやプロセスをクリアするのに便利です。" - -#: discord.PCMAudio:1 of -msgid "Represents raw 16-bit 48KHz stereo PCM audio source." -msgstr "生の16ビット48KHzステレオPCMオーディオソースを表します。" - -#: discord.PCMAudio:5 of -#, fuzzy -msgid "A file-like object that reads byte data representing raw PCM." -msgstr ":term:`py:file object` -- 生のPCMを表したバイトデータを読み取るファイルライクオブジェクト。" - -#: discord.PCMAudio:7 of -msgid ":term:`py:file object`" -msgstr "" - -#: discord.FFmpegAudio:1 of -msgid "Represents an FFmpeg (or AVConv) based AudioSource." -msgstr "" - -#: discord.FFmpegAudio:3 of -msgid "" -"User created AudioSources using FFmpeg differently from how " -":class:`FFmpegPCMAudio` and :class:`FFmpegOpusAudio` work should subclass" -" this." -msgstr "" - -#: discord.FFmpegOpusAudio:1 discord.FFmpegPCMAudio:1 of -msgid "An audio source from FFmpeg (or AVConv)." -msgstr "FFmpeg(またはAVConv)のオーディオソース。" - -#: discord.FFmpegPCMAudio:3 of -msgid "This launches a sub-process to a specific input file given." -msgstr "与えられた特定の入力ファイルに対してサブプロセスを起動します。" - -#: discord.FFmpegOpusAudio:18 discord.FFmpegPCMAudio:7 of -msgid "" -"You must have the ffmpeg or avconv executable in your path environment " -"variable in order for this to work." -msgstr "環境変数にffmpegまたはavconv実行可能ファイルがなければなりません。" - -#: discord.FFmpegPCMAudio:10 of -#, fuzzy -msgid "" -"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." -msgstr "" -"ffmpegが受け取り、PCMバイトへ変換する入力。 ``pipe`` " -"がTrueの場合、これはffmpegの標準入力に渡されるファイルライクオブジェクトです。" - -#: discord.FFmpegOpusAudio:39 discord.FFmpegPCMAudio:14 of -msgid "The executable name (and path) to use. Defaults to ``ffmpeg``." -msgstr "使用する実行可能ファイルの名前 (およびパス)。デフォルトでは ``ffmpeg`` です。" - -#: discord.FFmpegOpusAudio:41 discord.FFmpegPCMAudio:16 of -msgid "" -"If ``True``, denotes that ``source`` parameter will be passed to the " -"stdin of ffmpeg. Defaults to ``False``." -msgstr "``True`` の場合、 ``source`` パラメータがffmpegの標準入力に渡されます。デフォルトでは ``False`` です。" - -#: discord.FFmpegOpusAudio:44 discord.FFmpegPCMAudio:19 of -msgid "" -"A file-like object to pass to the Popen constructor. Could also be an " -"instance of ``subprocess.PIPE``." -msgstr "Popenのコンストラクタに渡すファイルライクオブジェクト。 ``subprocess.PIPE`` のようなインスタンスにすることも可能です。" - -#: discord.FFmpegOpusAudio:47 discord.FFmpegPCMAudio:22 of -msgid "Extra command line arguments to pass to ffmpeg before the ``-i`` flag." -msgstr "``-i`` フラグのまえにffmepgに渡す追加のコマンドライン引数。" - -#: discord.FFmpegOpusAudio:49 discord.FFmpegPCMAudio:24 of -msgid "Extra command line arguments to pass to ffmpeg after the ``-i`` flag." -msgstr "``-i`` フラグのあとにffmepgに渡す追加のコマンドライン引数。" - -#: discord.FFmpegOpusAudio:52 discord.FFmpegPCMAudio:27 of -#, fuzzy -msgid "The subprocess failed to be created." -msgstr ":exc:`ClientException` -- サブプロセスの作成に失敗した。" - -#: discord.FFmpegOpusAudio:3 of -msgid "" -"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." -msgstr "" - -#: discord.FFmpegOpusAudio:7 of -msgid "" -"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." -msgstr "" - -#: discord.FFmpegOpusAudio:21 of -#, fuzzy -msgid "" -"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." -msgstr "" -"ffmpegが受け取り、PCMバイトへ変換する入力。 ``pipe`` " -"がTrueの場合、これはffmpegの標準入力に渡されるファイルライクオブジェクトです。" - -#: discord.FFmpegOpusAudio:25 of -msgid "The bitrate in kbps to encode the output to. Defaults to ``128``." -msgstr "" - -#: discord.FFmpegOpusAudio:27 of -msgid "" -"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``." -" .. warning:: 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." -msgstr "" - -#: discord.FFmpegOpusAudio:27 of -msgid "" -"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``." -msgstr "" - -#: discord.FFmpegOpusAudio:35 of -msgid "" -"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." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:3 of -msgid "" -"A factory method that creates a :class:`FFmpegOpusAudio` after probing " -"the input source for audio codec and bitrate information." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:8 of -msgid "" -"Use this function to create an :class:`FFmpegOpusAudio` instance instead " -"of the constructor: ::" -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:13 of -msgid "" -"If you are on Windows and don't have ffprobe installed, use the " -"``fallback`` method to probe using ffmpeg instead: ::" -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:19 of -msgid "Using a custom method of determining codec and bitrate: ::" -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:29 of -msgid "Identical to the ``source`` parameter for the constructor." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:30 of -msgid "" -"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." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:36 of -msgid "" -"The remaining parameters to be passed to the :class:`FFmpegOpusAudio` " -"constructor, excluding ``bitrate`` and ``codec``." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:39 discord.FFmpegOpusAudio.probe:10 of -msgid "Invalid probe method, must be ``'native'`` or ``'fallback'``." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:40 discord.FFmpegOpusAudio.probe:11 of -msgid "Invalid value for ``probe`` parameter, must be :class:`str` or a callable." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:42 of -msgid "An instance of this class." -msgstr "" - -#: discord.FFmpegOpusAudio.from_probe:43 of -msgid ":class:`FFmpegOpusAudio`" -msgstr "" - -#: discord.FFmpegOpusAudio.probe:3 of -msgid "Probes the input source for bitrate and codec information." -msgstr "" - -#: discord.FFmpegOpusAudio.probe:5 of -msgid "Identical to the ``source`` parameter for :class:`FFmpegOpusAudio`." -msgstr "" - -#: discord.FFmpegOpusAudio.probe:6 of -msgid "" -"Identical to the ``method`` parameter for " -":meth:`FFmpegOpusAudio.from_probe`." -msgstr "" - -#: discord.FFmpegOpusAudio.probe:7 of -msgid "Identical to the ``executable`` parameter for :class:`FFmpegOpusAudio`." -msgstr "" - -#: discord.FFmpegOpusAudio.probe:13 of -msgid "A 2-tuple with the codec and bitrate of the input source." -msgstr "" - -#: discord.FFmpegOpusAudio.probe:14 of -msgid "Tuple[Optional[:class:`str`], Optional[:class:`int`]]" -msgstr "" - -#: discord.PCMVolumeTransformer:1 of -msgid "Transforms a previous :class:`AudioSource` to have volume controls." -msgstr "前述の :class:`AudioSource` をボリュームコントロールを持つものに変換します。" - -#: discord.PCMVolumeTransformer:3 of -msgid "" -"This does not work on audio sources that have :meth:`AudioSource.is_opus`" -" set to ``True``." -msgstr "これは :meth:`AudioSource.is_opus` が ``True`` になっているオーディオソースでは動作しません。" - -#: discord.PCMVolumeTransformer:6 of -msgid "The original AudioSource to transform." -msgstr "変換する元のAudioSource。" - -#: discord.PCMVolumeTransformer:8 of -msgid "The initial volume to set it to. See :attr:`volume` for more info." -msgstr "設定する初期ボリューム。詳細は :attr:`volume` を参照してください。" - -#: discord.PCMVolumeTransformer:12 of -#, fuzzy -msgid "Not an audio source." -msgstr "オーディオストリームを表します。" - -#: discord.PCMVolumeTransformer:13 of -#, fuzzy -msgid "The audio source is opus encoded." -msgstr ":exc:`ClientException` -- オーディオソースがopusエンコード済み。" - -#: discord.PCMVolumeTransformer.volume:1 of -#, fuzzy -msgid "" -"Retrieves or sets the volume as a floating point percentage (e.g. ``1.0``" -" for 100%)." -msgstr "ボリュームを浮動小数点数パーセンテージ (100%の場合は1.0)として取得、または設定します。" - -#: ../../api.rst:79 -msgid "Opus Library" -msgstr "Opusライブラリ" - -#: discord.opus.load_opus:1 of -msgid "Loads the libopus shared library for use with voice." -msgstr "libopus共有ライブラリを音声用にロードします。" - -#: discord.opus.load_opus:3 of -msgid "" -"If this function is not called then the library uses the function " -":func:`ctypes.util.find_library` and then loads that one if available." -msgstr "" -"この関数が呼び出されない場合、ライブラリは :func:`ctypes.util.find_library` " -"関数を使用して利用可能であればロードします。" - -#: discord.opus.load_opus:6 of -#, fuzzy -msgid "" -"Not loading a library and attempting to use PCM based AudioSources will " -"lead to voice not working." -msgstr "ライブラリをロードしないと音声が機能しなくなります。" - -#: discord.opus.load_opus:9 of -msgid "This function propagates the exceptions thrown." -msgstr "この関数は、スローされた例外を伝播します。" - -#: discord.opus.load_opus:13 of -msgid "" -"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." -msgstr "ライブラリのbit数は、あなたのPythonインタプリタのbit数と一致していなければなりません。ライブラリが64bitの場合は、Pythonインタプリタも64bitである必要があります。bit数が一致しない場合は、ロード時に例外を投げます。" - -#: discord.opus.load_opus:20 of -msgid "" -"On Windows, this function should not need to be called as the binaries " -"are automatically loaded." -msgstr "Windowsでは、バイナリが自動的に読み込まれるため、この関数を呼び出す必要はありません。" - -#: discord.opus.load_opus:25 of -msgid "" -"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." -msgstr "" -"Windowsでは .dll拡張は必要ありませんが、Linuxではライブラリをロードするために ``libopus.so.1`` " -"のような完全な拡張ライブラリが必要です。しかしながら、Linux上でも通常の場合は " -":func:`ctypes.util.find_library` が自動的にライブラリを検出します。" - -#: discord.opus.load_opus:30 of -msgid "The filename of the shared library." -msgstr "共有ライブラリのファイル名。" - -#: discord.opus.is_loaded:1 of -msgid "" -"Function to check if opus lib is successfully loaded either via the " -":func:`ctypes.util.find_library` call of :func:`load_opus`." -msgstr "" -":func:`load_opus` の :func:`ctypes.util.find_library` " -"呼び出しで、opusライブラリが正常にロードされたかどうかをチェックする関数。" - -#: discord.opus.is_loaded:4 of -msgid "This must return ``True`` for voice to work." -msgstr "ボイス関連の機能を動かすためには、これが ``True`` を返す必要があります。" - -#: discord.opus.is_loaded:6 of -msgid "Indicates if the opus library has been loaded." -msgstr "opusライブラリがロードされているかを表します。" - -#: ../../api.rst:88 -msgid "Event Reference" -msgstr "イベントリファレンス" - -#: ../../api.rst:90 -msgid "" -"This page outlines the different types of events listened by " -":class:`Client`." -msgstr "この項目では :class:`Client` が受け取る様々なイベントについて説明します。" - -#: ../../api.rst:92 -msgid "" -"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: ::" -msgstr "" -"イベントを登録する方法は二通りあります。一つ目は :meth:`Client.event` を使用する方法です。二つ目は " -":class:`Client` を継承してサブクラスを作り、イベントをオーバーライドする方法です。この方法を用いた場合は以下のようになります:" - -#: ../../api.rst:107 -msgid "" -"If an event handler raises an exception, :func:`on_error` will be called " -"to handle it, which defaults to print a traceback and ignoring the " -"exception." -msgstr "" -"イベントハンドラが例外を発生させると、それを処理するために :func:`on_error` が呼び出されます。 " -"デフォルトではトレースバックが出力され、例外は無視されます。" - -#: ../../api.rst:112 -msgid "" -"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." -msgstr "" -"すべてのイベントは |coroutine_link|_ である必要があります。 |coroutine_link|_ " -"でない場合、予期せぬエラーが発生する可能性があります。関数をコルーチンにするには、関数定義の際に ``async def`` を使用してください。" - -#: ../../api.rst:118 -msgid "" -"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." -msgstr "" -"クライアントがDiscordに正常に接続できたときに呼び出されます。クライアントの準備が完了していることと同義ではありません。 " -":func:`on_ready` を参照してください。" - -#: ../../api.rst:121 -msgid "The warnings on :func:`on_ready` also apply." -msgstr ":func:`on_ready` での警告も適用されます。" - -#: ../../api.rst:125 -#, fuzzy -msgid "" -"Similar to :func:`on_connect` except used by :class:`AutoShardedClient` " -"to denote when a particular shard ID has connected to Discord." -msgstr "" -"特定の Shard IDが準備完了になったかを確認するために :class:`AutoShardedClient` で使用される以外は " -":func:`on_ready` とほとんど同じです。" - -#: ../../api.rst:130 -#, fuzzy -msgid "The shard ID that has connected." -msgstr "準備が完了したShard ID。" - -#: ../../api.rst:135 -msgid "" -"Called when the client has disconnected from Discord. This could happen " -"either through the internet being disconnected, explicit calls to logout," -" or Discord terminating the connection one way or the other." -msgstr "クライアントがDiscordから切断したときに呼び出されます。これはインターネットが切断された、明示的にログアウトした、またはDiscord側から何らかの方法で切断されたというような場合に呼び出される可能性があります。" - -#: ../../api.rst:139 -msgid "This function can be called many times." -msgstr "この関数は何度でも呼び出すことができます。" - -#: ../../api.rst:143 -#, fuzzy -msgid "" -"Similar to :func:`on_disconnect` except used by " -":class:`AutoShardedClient` to denote when a particular shard ID has " -"disconnected from Discord." -msgstr "" -"特定の Shard IDが準備完了になったかを確認するために :class:`AutoShardedClient` で使用される以外は " -":func:`on_ready` とほとんど同じです。" - -#: ../../api.rst:148 -#, fuzzy -msgid "The shard ID that has disconnected." -msgstr "準備が完了したShard ID。" - -#: ../../api.rst:153 -msgid "" -"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." -msgstr "" -"クライアントがDiscordから受信したデータの準備を完了した際に呼び出されます。通常はログインが成功したあと、 " -":attr:`Client.guilds` とそれに関連するものの準備が完了したときです。" - -#: ../../api.rst:158 -msgid "" -"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." -msgstr "" -"このイベントは、最初に呼び出されるイベントとは限りません。同時に、このイベントは **一度だけ呼ばれるという保証もできません** " -"。このライブラリは、再接続ロジックを実装しているためリジューム要求が失敗するたびにこのイベントが呼び出されることになります。" - -#: ../../api.rst:165 -msgid "" -"Similar to :func:`on_ready` except used by :class:`AutoShardedClient` to " -"denote when a particular shard ID has become ready." -msgstr "" -"特定の Shard IDが準備完了になったかを確認するために :class:`AutoShardedClient` で使用される以外は " -":func:`on_ready` とほとんど同じです。" - -#: ../../api.rst:168 -msgid "The shard ID that is ready." -msgstr "準備が完了したShard ID。" - -#: ../../api.rst:173 -msgid "Called when the client has resumed a session." -msgstr "クライアントがセッションを再開したときに呼び出されます。" - -#: ../../api.rst:177 -#, fuzzy -msgid "" -"Similar to :func:`on_resumed` except used by :class:`AutoShardedClient` " -"to denote when a particular shard ID has resumed a session." -msgstr "" -"特定の Shard IDが準備完了になったかを確認するために :class:`AutoShardedClient` で使用される以外は " -":func:`on_ready` とほとんど同じです。" - -#: ../../api.rst:182 -#, fuzzy -msgid "The shard ID that has resumed." -msgstr "準備が完了したShard ID。" - -#: ../../api.rst:187 -msgid "" -"Usually when an event raises an uncaught exception, a traceback is " -"printed 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." -msgstr "イベントがキャッチされない例外を発生させた場合、通常はトレースバックがstderrに出力され、その例外は無視されます。何らかの理由でこの動作を変更して、自分自身で例外処理を行いたい場合は、このイベントをオーバーライドすることができます。これを行った場合、トレースバックを出力するというデフォルトの動作は行われません。" - -#: ../../api.rst:193 -msgid "" -"The information of the exception raised and the exception itself can be " -"retrieved with a standard call to :func:`sys.exc_info`." -msgstr "発生した例外の情報と、例外事態は :func:`sys.exc_info` への標準呼び出しで取得できます。" - -#: ../../api.rst:196 -msgid "" -"If you want exception to propagate out of the :class:`Client` class you " -"can define an ``on_error`` handler consisting of a single empty " -":ref:`py:raise`. Exceptions raised by ``on_error`` will not be handled " -"in any way by :class:`Client`." -msgstr "" -"例外を :class:`Client` クラスの外に伝播させたい場合は、単一の空の :ref:`py:raise` 文を持つ " -"``on_error`` を定義することができます。発生した例外は、 :class:`Client` の ``on_error`` " -"では決して処理されることはありません。" - -#: ../../api.rst:203 -msgid "``on_error`` will only be dispatched to :meth:`Client.event`." -msgstr "" - -#: ../../api.rst:205 -msgid "" -"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`." -msgstr "" - -#: ../../api.rst:209 -msgid "The name of the event that raised the exception." -msgstr "例外を発生させたイベントの名前。" - -#: ../../api.rst:212 -msgid "The positional arguments for the event that raised the exception." -msgstr "例外を発生させたイベントの位置引数。" - -#: ../../api.rst:214 -msgid "The keyword arguments for the event that raised the exception." -msgstr "例外を発生させたイベントのキーワード引数。" - -#: ../../api.rst:219 -msgid "" -"Called whenever a message is received from the WebSocket, before it's " -"processed. This event is always dispatched when a message is received and" -" the passed data is not processed in any way." -msgstr "メッセージが処理される前、WebSocketからメッセージが受信されるたびに呼び出されます。このイベントはメッセージを受信した場合、渡されたデータが処理できないときでも常に呼びだされます。" - -#: ../../api.rst:223 ../../api.rst:242 -msgid "" -"This is only really useful for grabbing the WebSocket stream and " -"debugging purposes." -msgstr "これはWebSocketストリームを取得してデバッグする時のみに役に立ちます。" - -#: ../../api.rst:228 -msgid "" -"This is only for the messages received from the client WebSocket. The " -"voice WebSocket will not trigger this event." -msgstr "これは、クライアントWebSocketから受信したメッセージ専用です。音声WebSocketではこのイベントは実行されません。" - -#: ../../api.rst:231 -msgid "" -"The message passed in from the WebSocket library. Could be :class:`bytes`" -" for a binary message or :class:`str` for a regular message." -msgstr "" -"WebSocketライブラリから渡されたメッセージ。バイナリメッセージの場合は :class:`bytes` 、通常のメッセージの場合は " -":class:`str` です。" - -#: ../../api.rst:238 -msgid "" -"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." -msgstr "メッセージが送信される前にWebSocketで送信操作が行われるたびに呼び出されます。渡されるパラメータはWebSocketに送信されているメッセージです。" - -#: ../../api.rst:247 -#, fuzzy -msgid "" -"This is only for the messages sent from the client WebSocket. The voice " -"WebSocket will not trigger this event." -msgstr "これは、クライアントWebSocketから受信したメッセージ専用です。音声WebSocketではこのイベントは実行されません。" - -#: ../../api.rst:250 -msgid "" -"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." -msgstr "" -"WebSocketライブラリから渡されるメッセージ。バイナリメッセージの場合は :class:`bytes` 、通常のメッセージの場合は " -":class:`str` です。" - -#: ../../api.rst:256 -msgid "Called when someone begins typing a message." -msgstr "誰かがメッセージを入力し始めたときに呼び出されます。" - -#: ../../api.rst:258 -msgid "" -"The ``channel`` parameter can be a :class:`abc.Messageable` instance. " -"Which could either be :class:`TextChannel`, :class:`GroupChannel`, or " -":class:`DMChannel`." -msgstr "" -"channelパラメータは :class:`abc.Messageable` インスタンスにすることができます。 " -":class:`TextChannel` 、 :class:`GroupChannel` 、または :class:`DMChannel` " -"のいずれかです。" - -#: ../../api.rst:262 -msgid "" -"If the ``channel`` is a :class:`TextChannel` then the ``user`` parameter " -"is a :class:`Member`, otherwise it is a :class:`User`." -msgstr "" -"``channel`` が :class:`TextChannel` である場合、 ``user`` パラメータは :class:`Member`" -" 、それ以外の場合は :class:`User` です。" - -#: ../../api.rst:265 -msgid "This requires :attr:`Intents.typing` to be enabled." -msgstr "" - -#: ../../api.rst:267 -msgid "The location where the typing originated from." -msgstr "入力が行われたチャンネル。" - -#: ../../api.rst:269 -msgid "The user that started typing." -msgstr "入力を始めたユーザー。" - -#: ../../api.rst:271 -msgid "When the typing started as a naive datetime in UTC." -msgstr "UTCのnaive datetimeでの、タイピングの開始時刻。" - -#: ../../api.rst:276 -msgid "Called when a :class:`Message` is created and sent." -msgstr ":class:`Message` が作成され送信されたときに呼び出されます。" - -#: ../../api.rst:278 ../../api.rst:301 ../../api.rst:318 ../../api.rst:331 -#: ../../api.rst:344 ../../api.rst:370 ../../api.rst:393 ../../api.rst:505 -#: ../../api.rst:514 -msgid "This requires :attr:`Intents.messages` to be enabled." -msgstr "" - -#: ../../api.rst:282 -msgid "" -"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." -msgstr "Botのメッセージとプライベートメッセージはこのイベントを通して送信されます。Botのプログラムによっては「再帰呼び出し」を続けることになります。Botが自分自身に返信しないようにするためにはユーザーIDを確認する方法が考えられます。この問題はBotが抱えるものではありません。" - -#: ../../api.rst:288 -msgid "The current message." -msgstr "現在のメッセージ。" - -#: ../../api.rst:293 -msgid "" -"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." -msgstr "メッセージが削除された際に呼び出されます。メッセージが内部のメッセージキャッシュに見つからない場合、このイベントは呼び出されません。これはメッセージが古すぎるか、クライアントが通信の多いギルドに参加している場合に発生します。" - -#: ../../api.rst:298 -#, fuzzy -msgid "" -"If this occurs increase the :attr:`Client.max_messages` attribute or use " -"the :func:`on_raw_message_delete` event instead." -msgstr "このような場合には :attr:`Client.max_messages` を増やしてください。" - -#: ../../api.rst:303 -msgid "The deleted message." -msgstr "削除されたメッセージ。" - -#: ../../api.rst:308 -msgid "" -"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." -msgstr "メッセージが一括削除されたときに呼び出されます。メッセージが内部のメッセージキャッシュに見つからない場合、このイベントは呼び出されません。個々のメッセージが見つからない場合でも、このイベントは呼び出されますが、見つからなかったメッセージはメッセージのリストに含まれません。これはメッセージが古すぎるか、クライアントが通信の多いギルドに参加している場合に発生します。" - -#: ../../api.rst:315 -#, fuzzy -msgid "" -"If this occurs increase the :attr:`Client.max_messages` attribute or use " -"the :func:`on_raw_bulk_message_delete` event instead." -msgstr "このような場合には :attr:`Client.max_messages` を増やしてください。" - -#: ../../api.rst:320 -msgid "The messages that have been deleted." -msgstr "削除されたメッセージのリスト。" - -#: ../../api.rst:325 -msgid "" -"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." -msgstr "" -"メッセージが削除されたときに呼び出されます。 :func:`on_message_delete` " -"とは異なり、削除されたメッセージが内部キャッシュに存在するか否かにかかわらず呼び出されます。" - -#: ../../api.rst:328 -msgid "" -"If the message is found in the message cache, it can be accessed via " -":attr:`RawMessageDeleteEvent.cached_message`" -msgstr "" -"メッセージがメッセージキャッシュ内に見つかった場合、 :attr:`RawMessageDeleteEvent.cached_message` " -"を介してアクセスすることができます。" - -#: ../../api.rst:333 ../../api.rst:346 ../../api.rst:395 ../../api.rst:422 -#: ../../api.rst:449 ../../api.rst:472 ../../api.rst:497 -msgid "The raw event payload data." -msgstr "生のイベントペイロードデータ。" - -#: ../../api.rst:338 -msgid "" -"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." -msgstr "" -"メッセージが一括削除されたときに呼び出されます。 :func:`on_bulk_message_delete` " -"とは異なり、削除されたメッセージが内部キャッシュに存在するか否かにかかわらず呼び出されます。" - -#: ../../api.rst:341 -msgid "" -"If the messages are found in the message cache, they can be accessed via " -":attr:`RawBulkMessageDeleteEvent.cached_messages`" -msgstr "" -"メッセージがメッセージキャッシュ内に見つかった場合、 " -":attr:`RawBulkMessageDeleteEvent.cached_messages` を介してアクセスすることができます。" - -#: ../../api.rst:351 -msgid "" -"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." -msgstr "" -":class:`Message` " -"が更新イベントを受け取ったときに呼び出されます。メッセージが内部のメッセージキャッシュに見つからない場合、このイベントは呼び出されません。これはメッセージが古すぎるか、クライアントが通信の多いギルドに参加している場合に発生します。" - -#: ../../api.rst:356 -#, fuzzy -msgid "" -"If this occurs increase the :attr:`Client.max_messages` attribute or use " -"the :func:`on_raw_message_edit` event instead." -msgstr "このような場合には :attr:`Client.max_messages` を増やしてください。" - -#: ../../api.rst:359 -msgid "The following non-exhaustive cases trigger this event:" -msgstr "以下の非網羅的ケースがこのイベントを発生させます:" - -#: ../../api.rst:361 -msgid "A message has been pinned or unpinned." -msgstr "メッセージをピン留め、または解除した。" - -#: ../../api.rst:362 -msgid "The message content has been changed." -msgstr "メッセージの内容を変更した。" - -#: ../../api.rst:363 -msgid "The message has received an embed." -msgstr "メッセージが埋め込みを受け取った。" - -#: ../../api.rst:365 -msgid "" -"For performance reasons, the embed server does not do this in a " -"\"consistent\" manner." -msgstr "パフォーマンス上の理由から、埋め込みのサーバーはこれを「一貫した」方法では行いません。" - -#: ../../api.rst:367 -msgid "The message's embeds were suppressed or unsuppressed." -msgstr "" - -#: ../../api.rst:368 -msgid "A call message has received an update to its participants or ending time." -msgstr "通話呼び出しメッセージの参加者や終了時刻が変わった。" - -#: ../../api.rst:372 -msgid "The previous version of the message." -msgstr "更新前のメッセージ。" - -#: ../../api.rst:374 -msgid "The current version of the message." -msgstr "更新後のメッセージ。" - -#: ../../api.rst:379 -msgid "" -"Called when a message is edited. Unlike :func:`on_message_edit`, this is " -"called regardless of the state of the internal message cache." -msgstr "" -"メッセージが編集されたときに呼び出されます。 :func:`on_message_edit` " -"とは異なり、これは内部のメッセージキャッシュの状態に関係なく呼び出されます。" - -#: ../../api.rst:382 -msgid "" -"If the message is found in the message cache, it can be accessed via " -":attr:`RawMessageUpdateEvent.cached_message`" -msgstr "" -"メッセージがメッセージキャッシュ内に見つかった場合、 :attr:`RawMessageUpdateEvent.cached_message` " -"を介してアクセスすることができます。" - -#: ../../api.rst:385 -#, fuzzy -msgid "" -"Due to the inherently raw nature of this event, the data parameter " -"coincides with the raw data given by the `gateway " -"`_." -msgstr "" -"このイベントの性質は、本質的に生表現のため、データのパラメータは `ゲートウェイ " -"`_ " -"によって与えられた生データと一致します。" - -#: ../../api.rst:388 -msgid "" -"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." -msgstr "データのペイロードが部分的であるため、データにアクセスするときは気をつけてください。部分的なデータの主な場合のひとつは、``'content'``にアクセスできない場合です。Discordの埋め込みサーバーによって、埋め込みが更新される、\"埋め込み\"しか変わっていない編集がそうです。" - -#: ../../api.rst:400 -#, fuzzy -msgid "" -"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." -msgstr "" -"メッセージにリアクションが追加されたときに呼び出されます。 :func:`on_message_edit` " -"のように、内部メッセージキャッシュにメッセージが見つからない場合は、このイベントは呼び出されません。" - -#: ../../api.rst:406 -msgid "" -"To get the :class:`Message` being reacted, access it via " -":attr:`Reaction.message`." -msgstr "リアクションの付いた:class:`Message`を取得するには、:attr:`Reaction.message`を使ってください。" - -#: ../../api.rst:408 ../../api.rst:420 ../../api.rst:435 ../../api.rst:447 -#: ../../api.rst:458 ../../api.rst:470 ../../api.rst:481 ../../api.rst:493 -msgid "This requires :attr:`Intents.reactions` to be enabled." -msgstr "" - -#: ../../api.rst:410 ../../api.rst:437 -msgid "The current state of the reaction." -msgstr "リアクションの現在の状態。" - -#: ../../api.rst:412 ../../api.rst:439 -msgid "The user who added the reaction." -msgstr "リアクションを追加したユーザー。" - -#: ../../api.rst:417 -msgid "" -"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." -msgstr "" -"メッセージにリアクションが追加されたときに呼び出されます。 :func:`on_reaction_add` " -"とは異なり、これは内部のメッセージキャッシュの状態に関係なく呼び出されます。" - -#: ../../api.rst:427 -msgid "" -"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." -msgstr "メッセージのリアクションが取り除かれたときに呼び出されます。on_message_editのように、内部のメッセージキャッシュにメッセージがないときには、このイベントは呼び出されません。" - -#: ../../api.rst:433 -msgid "To get the message being reacted, access it via :attr:`Reaction.message`." -msgstr "リアクションの付いたメッセージを取得するには、:attr:`Reaction.message`を使ってください。" - -#: ../../api.rst:444 -msgid "" -"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." -msgstr "" -"メッセージからリアクションが削除されたときに呼び出されます。 :func:`on_reaction_remove` " -"とは異なり、これは内部メッセージキャッシュの状態に関係なく呼び出されます。" - -#: ../../api.rst:454 -#, fuzzy -msgid "" -"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." -msgstr "" -"メッセージのリアクションがすべて削除されたときに呼び出されます。 :func:`on_message_edit` " -"のように、内部メッセージキャッシュにメッセージが見つからない場合は、このイベントは呼び出されません。" - -#: ../../api.rst:460 -msgid "The message that had its reactions cleared." -msgstr "リアクションが削除されたメッセージ。" - -#: ../../api.rst:462 -msgid "The reactions that were removed." -msgstr "除去されたリアクション。" - -#: ../../api.rst:467 -msgid "" -"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." -msgstr "" -"メッセージからリアクションがすべて削除されたときに呼び出されます。 :func:`on_reaction_clear` " -"とは異なり、これは内部メッセージキャッシュの状態に関係なく呼び出されます。" - -#: ../../api.rst:477 -#, fuzzy -msgid "" -"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." -msgstr "" -"メッセージのリアクションがすべて削除されたときに呼び出されます。 :func:`on_message_edit` " -"のように、内部メッセージキャッシュにメッセージが見つからない場合は、このイベントは呼び出されません。" - -#: ../../api.rst:485 -#, fuzzy -msgid "The reaction that got cleared." -msgstr "除去されたリアクション。" - -#: ../../api.rst:490 -#, fuzzy -msgid "" -"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." -msgstr "" -"メッセージからリアクションがすべて削除されたときに呼び出されます。 :func:`on_reaction_clear` " -"とは異なり、これは内部メッセージキャッシュの状態に関係なく呼び出されます。" - -#: ../../api.rst:503 -msgid "Called whenever a private channel is deleted or created." -msgstr "プライベートチャンネルが削除されたり作成されたときに呼び出されます。" - -#: ../../api.rst:507 -msgid "The private channel that got created or deleted." -msgstr "作成、または削除されたプライベートチャンネル。" - -#: ../../api.rst:512 -msgid "Called whenever a private group DM is updated. e.g. changed name or topic." -msgstr "プライベートグループDMが更新されたとき呼び出されます。 例: 名前やトピックの変更。" - -#: ../../api.rst:516 -msgid "The updated group channel's old info." -msgstr "更新されたグループチャンネルの更新前情報。" - -#: ../../api.rst:518 -msgid "The updated group channel's new info." -msgstr "更新されたグループチャンネルの更新後情報。" - -#: ../../api.rst:523 -msgid "Called whenever a message is pinned or unpinned from a private channel." -msgstr "プライベートチャンネルのメッセージがピン留めされたりはずされたりしたときに呼ばれます。" - -#: ../../api.rst:525 -msgid "The private channel that had its pins updated." -msgstr "ピン留めが更新されたプライベートチャンネル。" - -#: ../../api.rst:527 ../../api.rst:561 -msgid "" -"The latest message that was pinned as a naive datetime in UTC. Could be " -"``None``." -msgstr "最後にピン留めされたメッセージがピン留めされたUTC naive datetime。 ``None``の場合もあります。" - -#: ../../api.rst:533 -msgid "Called whenever a guild channel is deleted or created." -msgstr "ギルドのチャンネルが削除・作成されたとき呼び出されます。" - -#: ../../api.rst:535 -msgid "Note that you can get the guild from :attr:`~abc.GuildChannel.guild`." -msgstr "ギルドは :attr:`~abc.GuildChannel.guild` で取得できます。" - -#: ../../api.rst:537 ../../api.rst:546 ../../api.rst:557 ../../api.rst:634 -#: ../../api.rst:653 ../../api.rst:667 ../../api.rst:681 ../../api.rst:690 -#: ../../api.rst:716 -msgid "This requires :attr:`Intents.guilds` to be enabled." -msgstr "" - -#: ../../api.rst:539 -msgid "The guild channel that got created or deleted." -msgstr "作成、または削除されたギルドチャンネル。" - -#: ../../api.rst:544 -msgid "" -"Called whenever a guild channel is updated. e.g. changed name, topic, " -"permissions." -msgstr "ギルドチャンネルが更新されるたびに呼び出されます。例えば名前、トピック、権限の変更などです。" - -#: ../../api.rst:548 -msgid "The updated guild channel's old info." -msgstr "更新されたギルドの更新前情報。" - -#: ../../api.rst:550 -msgid "The updated guild channel's new info." -msgstr "更新されたギルドの更新後情報。" - -#: ../../api.rst:555 -msgid "Called whenever a message is pinned or unpinned from a guild channel." -msgstr "ギルドチャンネルのメッセージがピン留めされたり、解除されたりしたときに呼び出されます。" - -#: ../../api.rst:559 -msgid "The guild channel that had its pins updated." -msgstr "ピン留めが更新されたギルドチャンネル。" - -#: ../../api.rst:568 -msgid "" -"Called whenever an integration is created, modified, or removed from a " -"guild." -msgstr "ギルドの連携サービスが作成、更新、削除されるたびに呼び出されます。" - -#: ../../api.rst:570 -msgid "This requires :attr:`Intents.integrations` to be enabled." -msgstr "" - -#: ../../api.rst:572 -msgid "The guild that had its integrations updated." -msgstr "連携サービスが更新されたギルド。" - -#: ../../api.rst:577 -msgid "" -"Called whenever a webhook is created, modified, or removed from a guild " -"channel." -msgstr "ギルドチャンネルのWebhookが作成、更新、削除されたときに呼び出されます。" - -#: ../../api.rst:579 -msgid "This requires :attr:`Intents.webhooks` to be enabled." -msgstr "" - -#: ../../api.rst:581 -msgid "The channel that had its webhooks updated." -msgstr "Webhookが更新されたチャンネル。" - -#: ../../api.rst:587 -msgid "Called when a :class:`Member` leaves or joins a :class:`Guild`." -msgstr ":class:`Member` が :class:`Guild` に参加したり退出したりしたときに呼び出されます。" - -#: ../../api.rst:589 ../../api.rst:605 ../../api.rst:622 -msgid "This requires :attr:`Intents.members` to be enabled." -msgstr "" - -#: ../../api.rst:591 -msgid "The member who joined or left." -msgstr "参加、または脱退したメンバー。" - -#: ../../api.rst:596 -msgid "Called when a :class:`Member` updates their profile." -msgstr ":class:`Member` がプロフィールを編集したとき呼び出されます。" - -#: ../../api.rst:598 ../../api.rst:616 -msgid "This is called when one or more of the following things change:" -msgstr "これらのうちひとつ以上が変更されたとき呼び出されます:" - -#: ../../api.rst:600 -msgid "status" -msgstr "ステータス" - -#: ../../api.rst:601 -msgid "activity" -msgstr "" - -#: ../../api.rst:602 -msgid "nickname" -msgstr "ニックネーム" - -#: ../../api.rst:603 discord.Member.edit:16 of -msgid "roles" -msgstr "roles" - -#: ../../api.rst:607 -msgid "The updated member's old info." -msgstr "更新されたメンバーの更新前情報。" - -#: ../../api.rst:609 -msgid "The updated member's updated info." -msgstr "更新されたメンバーの更新後情報。" - -#: ../../api.rst:614 -msgid "Called when a :class:`User` updates their profile." -msgstr ":class:`User` がプロフィールを編集したとき呼び出されます。" - -#: ../../api.rst:618 -msgid "avatar" -msgstr "アバター" - -#: ../../api.rst:619 -msgid "username" -msgstr "ユーザー名" - -#: ../../api.rst:620 -msgid "discriminator" -msgstr "識別子" - -#: ../../api.rst:624 -msgid "The updated user's old info." -msgstr "更新されたユーザーの更新前情報。" - -#: ../../api.rst:626 -msgid "The updated user's updated info." -msgstr "更新されたユーザーの更新後情報。" - -#: ../../api.rst:631 -msgid "" -"Called when a :class:`Guild` is either created by the :class:`Client` or " -"when the :class:`Client` joins a guild." -msgstr "" -":class:`Client` によって :class:`Guild` が作成された。または :class:`Client` " -"がギルドに参加したときに呼び出されます。" - -#: ../../api.rst:636 -msgid "The guild that was joined." -msgstr "参加したギルド。" - -#: ../../api.rst:641 -msgid "Called when a :class:`Guild` is removed from the :class:`Client`." -msgstr ":class:`Client` が :class:`Guild` から削除されたときに呼び出されます。" - -#: ../../api.rst:643 -msgid "This happens through, but not limited to, these circumstances:" -msgstr "これは以下の状況時に呼び出されますが、これに限ったものではありません:" - -#: ../../api.rst:645 -msgid "The client got banned." -msgstr "クライアントがBANされた。" - -#: ../../api.rst:646 -msgid "The client got kicked." -msgstr "クライアントがキックされた。" - -#: ../../api.rst:647 -msgid "The client left the guild." -msgstr "クライアントがギルドから退出した。" - -#: ../../api.rst:648 -msgid "The client or the guild owner deleted the guild." -msgstr "クライアント、またはギルドオーナーがギルドを削除した。" - -#: ../../api.rst:650 -msgid "" -"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`)" -msgstr "" -"このイベントが呼び出されるためには、 :class:`Client` がギルドに参加している必要があります。(つまり、 " -":attr:`Client.guilds` にギルドが存在しなければならない)" - -#: ../../api.rst:655 -msgid "The guild that got removed." -msgstr "削除されたギルド。" - -#: ../../api.rst:660 -msgid "Called when a :class:`Guild` updates, for example:" -msgstr ":class:`Guild` が更新されたときに呼び出されます。例えば:" - -#: ../../api.rst:662 -msgid "Changed name" -msgstr "名前が変更された" - -#: ../../api.rst:663 -msgid "Changed AFK channel" -msgstr "AFKチャンネルが変更された" - -#: ../../api.rst:664 -msgid "Changed AFK timeout" -msgstr "AFKのタイムアウト時間が変更された" - -#: ../../api.rst:665 -msgid "etc" -msgstr "その他" - -#: ../../api.rst:669 -msgid "The guild prior to being updated." -msgstr "更新される前のギルド。" - -#: ../../api.rst:671 -msgid "The guild after being updated." -msgstr "更新された後のギルド。" - -#: ../../api.rst:677 -msgid "Called when a :class:`Guild` creates or deletes a new :class:`Role`." -msgstr ":class:`Guild` で :class:`Role` が新しく作成されたか、削除されたときに呼び出されます。" - -#: ../../api.rst:679 -msgid "To get the guild it belongs to, use :attr:`Role.guild`." -msgstr "ギルドを取得するには :attr:`Role.guild` を使用してください。" - -#: ../../api.rst:683 -msgid "The role that was created or deleted." -msgstr "作成、または削除された役職。" - -#: ../../api.rst:688 -msgid "Called when a :class:`Role` is changed guild-wide." -msgstr ":class:`Role` がギルド全体で変更されたときに呼び出されます。" - -#: ../../api.rst:692 -msgid "The updated role's old info." -msgstr "更新された役職の更新前情報。" - -#: ../../api.rst:694 -msgid "The updated role's updated info." -msgstr "更新された役職の更新後情報。" - -#: ../../api.rst:699 -msgid "Called when a :class:`Guild` adds or removes :class:`Emoji`." -msgstr ":class:`Guild` に :class:`Emoji` が追加、または削除されたときに呼び出されます。" - -#: ../../api.rst:701 -msgid "This requires :attr:`Intents.emojis` to be enabled." -msgstr "" - -#: ../../api.rst:703 -msgid "The guild who got their emojis updated." -msgstr "絵文字が更新されたギルド。" - -#: ../../api.rst:705 -msgid "A list of emojis before the update." -msgstr "更新前の絵文字のリスト。" - -#: ../../api.rst:707 -msgid "A list of emojis after the update." -msgstr "更新後の絵文字のリスト。" - -#: ../../api.rst:713 -msgid "" -"Called when a guild becomes available or unavailable. The guild must have" -" existed in the :attr:`Client.guilds` cache." -msgstr "ギルドが利用可能・不可能になったときに呼び出されます。ギルドは :attr:`Client.guilds` キャッシュに存在していないといけません。" - -#: ../../api.rst:718 -msgid "The :class:`Guild` that has changed availability." -msgstr "利用状況が変わった:class:`Guild`。" - -#: ../../api.rst:722 -msgid "Called when a :class:`Member` changes their :class:`VoiceState`." -msgstr ":class:`Member` が :class:`VoiceState` を変更したとき呼び出されます。" - -#: ../../api.rst:724 -msgid "" -"The following, but not limited to, examples illustrate when this event is" -" called:" -msgstr "これらの場合に限りませんが、例を挙げると、以下の場合に呼び出されます:" - -#: ../../api.rst:726 -msgid "A member joins a voice channel." -msgstr "メンバーがボイスチャンネルに参加したとき。" - -#: ../../api.rst:727 -msgid "A member leaves a voice channel." -msgstr "メンバーがボイスチャンネルから退出したとき。" - -#: ../../api.rst:728 -msgid "A member is muted or deafened by their own accord." -msgstr "メンバーが自身でマイクやスピーカーをミュートしたとき。" - -#: ../../api.rst:729 -msgid "A member is muted or deafened by a guild administrator." -msgstr "メンバーがギルドの管理者によってマイクやスピーカーをミュートされたとき。" - -#: ../../api.rst:731 -msgid "This requires :attr:`Intents.voice_states` to be enabled." -msgstr "" - -#: ../../api.rst:733 -msgid "The member whose voice states changed." -msgstr "ボイスの状態が変わった `Member` 。" - -#: ../../api.rst:735 -msgid "The voice state prior to the changes." -msgstr "更新前のボイス状態。" - -#: ../../api.rst:737 -msgid "The voice state after to the changes." -msgstr "更新後のボイス状態。" - -#: ../../api.rst:742 -msgid "Called when user gets banned from a :class:`Guild`." -msgstr "ユーザーが :class:`Guild` からBANされたとき呼び出されます。" - -#: ../../api.rst:744 ../../api.rst:757 -msgid "This requires :attr:`Intents.bans` to be enabled." -msgstr "" - -#: ../../api.rst:746 -msgid "The guild the user got banned from." -msgstr "ユーザーがBANされたギルド。" - -#: ../../api.rst:748 -msgid "" -"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." -msgstr "BANされたユーザー。BAN時にユーザーがギルドにいたかによって、 :class:`User` か :class:`Member` になります。" - -#: ../../api.rst:755 -msgid "Called when a :class:`User` gets unbanned from a :class:`Guild`." -msgstr ":class:`User` が :class:`Guild` のBANを解除されたとき呼び出されます。" - -#: ../../api.rst:759 -msgid "The guild the user got unbanned from." -msgstr "ユーザーのBANが解除されたギルド。" - -#: ../../api.rst:761 -msgid "The user that got unbanned." -msgstr "Banが解除されたユーザー。" - -#: ../../api.rst:766 -#, fuzzy -msgid "" -"Called when an :class:`Invite` is created. You must have the " -":attr:`~Permissions.manage_channels` permission to receive this." -msgstr "これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` 権限が必要です。" - -#: ../../api.rst:773 ../../api.rst:790 -msgid "" -"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." -msgstr "" - -#: ../../api.rst:776 ../../api.rst:796 -msgid "This requires :attr:`Intents.invites` to be enabled." -msgstr "" - -#: ../../api.rst:778 discord.CategoryChannel.create_invite:26 -#: discord.TextChannel.create_invite:26 discord.VoiceChannel.create_invite:26 -#: discord.abc.GuildChannel.create_invite:26 of -msgid "The invite that was created." -msgstr "" - -#: ../../api.rst:783 -#, fuzzy -msgid "" -"Called when an :class:`Invite` is deleted. You must have the " -":attr:`~Permissions.manage_channels` permission to receive this." -msgstr "これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` 権限が必要です。" - -#: ../../api.rst:793 -msgid "" -"Outside of those two attributes, the only other attribute guaranteed to " -"be filled by the Discord gateway for this event is :attr:`Invite.code`." -msgstr "" - -#: ../../api.rst:798 -#, fuzzy -msgid "The invite that was deleted." -msgstr "招待の更新。" - -#: ../../api.rst:804 -msgid "Called when someone joins or leaves a :class:`GroupChannel`." -msgstr "誰かが :class:`GroupChannel` に参加、または脱退したときに呼び出されます。" - -#: ../../api.rst:806 -msgid "The group that the user joined or left." -msgstr "ユーザーが参加または脱退したグループ。" - -#: ../../api.rst:808 -msgid "The user that joined or left." -msgstr "参加または脱退したユーザー。" - -#: ../../api.rst:814 -msgid "" -"Called when a :class:`Relationship` is added or removed from the " -":class:`ClientUser`." -msgstr ":class:`ClientUser` の :class:`Relationship` が追加・削除されたとき呼び出されます。" - -#: ../../api.rst:817 -msgid "The relationship that was added or removed." -msgstr "追加・削除されたRelationship。" - -#: ../../api.rst:822 -msgid "" -"Called when a :class:`Relationship` is updated, e.g. when you block a " -"friend or a friendship is accepted." -msgstr ":class:`Relationship` が更新されたとき、たとえばフレンドをブロックしたり、フレンドが承認されたときに呼び出されます。" - -#: ../../api.rst:825 -msgid "The previous relationship status." -msgstr "以前のフレンドの状態。" - -#: ../../api.rst:827 -msgid "The updated relationship status." -msgstr "更新されたのフレンドの状態。" - -#: ../../api.rst:833 -msgid "Utility Functions" -msgstr "ユーティリティ関数" - -#: discord.utils.find:1 of -msgid "" -"A helper to return the first element found in the sequence that meets the" -" predicate. For example: ::" -msgstr "与えられた関数を満たす最初の要素を返すヘルパー。例: ::" - -#: discord.utils.find:6 of -msgid "" -"would find the first :class:`~discord.Member` whose name is 'Mighty' and " -"return it. If an entry is not found, then ``None`` is returned." -msgstr "" -"は、名前が'Mighty'である最初に見つかった :class:`~discord.Member` を返します。見つからない場合は " -"``None`` を返します。" - -#: discord.utils.find:9 of -msgid "" -"This is different from :func:`py:filter` due to the fact it stops the " -"moment it finds a valid entry." -msgstr "これは、適切な値を見つけると止まる点で、 :func:`py:filter` と異なります。" - -#: discord.utils.find:12 of -msgid "A function that returns a boolean-like result." -msgstr "真偽値を返す関数。" - -#: discord.utils.find:13 of -msgid "The iterable to search through." -msgstr "検索するイテラブル。" - -#: discord.utils.get:1 of -msgid "" -"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`." -msgstr "``attrs`` に渡されたすべての条件を満たす最初の要素を返すヘルパー。 :func:`~discord.utils.find` の代替案です。" - -#: discord.utils.get:5 of -msgid "" -"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." -msgstr "複数の条件が指定されている場合、またはではなくかつでチェックされます。つまり、どれかではなく、すべての条件を満たさないといけません。" - -#: discord.utils.get:9 of -msgid "" -"To have a nested attribute search (i.e. search by ``x.y``) then pass in " -"``x__y`` as the keyword argument." -msgstr "ネストされている属性で検索するとき (例: ``x.y`` で検索) は、キーワード引数に ``x__y`` を渡してください。" - -#: discord.utils.get:12 of -msgid "" -"If nothing is found that matches the attributes passed, then ``None`` is " -"returned." -msgstr "与えられた属性にマッチする項目がない場合、 ``None`` を返します。" - -#: discord.utils.get:17 of -msgid "Basic usage:" -msgstr "基本的な使用法:" - -#: discord.utils.get:23 of -msgid "Multiple attribute matching:" -msgstr "複数の属性のマッチ:" - -#: discord.utils.get:29 of -msgid "Nested attribute matching:" -msgstr "ネストされた属性のマッチ:" - -#: discord.utils.get:35 of -msgid "An iterable to search through." -msgstr "検索するイテラブル。" - -#: discord.utils.get:36 of -msgid "Keyword arguments that denote attributes to search with." -msgstr "検索用の属性を表すキーワード引数。" - -#: discord.utils.snowflake_time:1 of -msgid "The snowflake ID." -msgstr "" - -#: discord.utils.snowflake_time:4 of -#, fuzzy -msgid "The creation date in UTC of a Discord snowflake ID." -msgstr "Discordのsnowflake IDの作成日時をUTCで返します。" - -#: ../../api.rst:878 discord.AuditLogEntry.created_at:3 -#: discord.CategoryChannel.created_at:3 discord.ClientUser.created_at:5 -#: discord.DMChannel.created_at:3 discord.Embed:51 discord.Emoji.created_at:3 -#: discord.GroupChannel.created_at:3 discord.Guild.created_at:3 -#: discord.Integration:81 discord.Invite:74 discord.Message.created_at:3 -#: discord.Object.created_at:3 discord.PartialInviteChannel.created_at:3 -#: discord.PartialInviteGuild.created_at:3 discord.Role.created_at:3 -#: discord.Spotify.end:3 discord.Spotify.start:3 discord.Template:39 -#: discord.Template:45 discord.TextChannel.created_at:3 -#: discord.User.created_at:5 discord.VoiceChannel.created_at:3 -#: discord.Webhook.created_at:3 discord.Widget.created_at:3 -#: discord.WidgetChannel.created_at:3 discord.WidgetMember.created_at:5 -#: discord.abc.GuildChannel.created_at:3 discord.abc.Snowflake.created_at:3 -#: discord.utils.snowflake_time:5 of -msgid ":class:`datetime.datetime`" -msgstr "" - -#: discord.utils.oauth_url:1 of -msgid "" -"A helper function that returns the OAuth2 URL for inviting the bot into " -"guilds." -msgstr "ボットをギルドに招待するOAuth2 URLを返すヘルパー関数。" - -#: discord.utils.oauth_url:4 of -msgid "The client ID for your bot." -msgstr "ボットのクライアントID。" - -#: discord.utils.oauth_url:6 of -msgid "" -"The permissions you're requesting. If not given then you won't be " -"requesting any permissions." -msgstr "要求する権限。もし与えられていない場合、権限を要求しません。" - -#: discord.utils.oauth_url:9 of -msgid "The guild to pre-select in the authorization screen, if available." -msgstr "利用できる場合は、認証画面であらかじめ選択されるギルド。" - -#: discord.utils.oauth_url:11 of -msgid "An optional valid redirect URI." -msgstr "任意の有効なリダイレクトURI。" - -#: discord.utils.oauth_url:14 of -#, fuzzy -msgid "The OAuth2 URL for inviting the bot into guilds." -msgstr "ボットをギルドに招待するOAuth2 URLを返すヘルパー関数。" - -#: discord.utils.escape_markdown:1 of -msgid "A helper function that escapes Discord's markdown." -msgstr "Discordのマークダウンをエスケープするヘルパー関数。" - -#: discord.utils.escape_markdown:3 of -msgid "The text to escape markdown from." -msgstr "マークダウンをエスケープするテキスト。" - -#: discord.utils.escape_markdown:5 of -msgid "" -"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``." -msgstr "" -"必要に応じてマークダウンをエスケープするかどうか。必要でなければ無関係な文字をエスケープしません。 ``**hello**`` は " -"``\\*\\*hello\\*\\*`` ではなく ``\\*\\*hello**`` " -"にエスケープされます。ただし、これによって巧妙な構文の乱用が発生する可能性があります。デフォルトは ``False`` です。" - -#: discord.utils.escape_markdown:11 of -msgid "" -"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``." -msgstr "" -"マークダウンをエスケープするときにリンクを残すかどうか。たとえば、テキスト中のURLが ``_`` " -"のような文字を含む場合、これは残されます。これは ``as_needed`` と併用できません。デフォルトは ``True`` です。" - -#: discord.utils.escape_markdown:17 of -msgid "The text with the markdown special characters escaped with a slash." -msgstr "マークダウンの特殊文字をスラッシュでエスケープしたテキスト。" - -#: discord.utils.escape_mentions:1 of -msgid "A helper function that escapes everyone, here, role, and user mentions." -msgstr "everyone、here、役職とユーザーのメンションをエスケープするヘルパー関数。" - -#: discord.utils.escape_mentions:5 of -msgid "This does not include channel mentions." -msgstr "チャンネルのメンションはエスケープしません。" - -#: discord.utils.escape_mentions:9 of -msgid "" -"For more granular control over what mentions should be escaped within " -"messages, refer to the :class:`~discord.AllowedMentions` class." -msgstr "" - -#: discord.utils.escape_mentions:13 of -msgid "The text to escape mentions from." -msgstr "メンションをエスケープするテキスト。" - -#: discord.utils.escape_mentions:16 of -msgid "The text with the mentions removed." -msgstr "メンションが削除されたテキスト。" - -#: discord.utils.resolve_invite:1 of -#, fuzzy -msgid "Resolves an invite from a :class:`~discord.Invite`, URL or code." -msgstr ":class:`~discord.Invite` やURL、IDから招待を解決します" - -#: discord.utils.resolve_invite:3 of -msgid "The invite." -msgstr "招待。" - -#: discord.utils.resolve_invite:6 of -msgid "The invite code." -msgstr "招待コード。" - -#: discord.utils.resolve_template:1 of -#, fuzzy -msgid "Resolves a template code from a :class:`~discord.Template`, URL or code." -msgstr ":class:`~discord.Invite` やURL、IDから招待を解決します" - -#: discord.utils.resolve_template:5 of -#, fuzzy -msgid "The code." -msgstr "招待コード。" - -#: discord.Template:7 discord.utils.resolve_template:8 of -#, fuzzy -msgid "The template code." -msgstr "招待コード。" - -#: discord.utils.sleep_until:3 of -#, fuzzy -msgid "Sleep until a specified time." -msgstr "特定のインデックスのフィールドを削除します。" - -#: discord.utils.sleep_until:5 of -msgid "If the time supplied is in the past this function will yield instantly." -msgstr "" - -#: discord.utils.sleep_until:9 of -msgid "" -"The timestamp in which to sleep until. If the datetime is naive then it " -"is assumed to be in UTC." -msgstr "" - -#: discord.utils.sleep_until:12 of -msgid "If provided is returned to the caller when the coroutine completes." -msgstr "" - -#: ../../api.rst:854 -msgid "Profile" -msgstr "プロフィール" - -#: ../../api.rst:858 -msgid "A namedtuple representing a user's Discord public profile." -msgstr "Discordの公開プロフィールを表すnamedtuple。" - -#: ../../api.rst:862 -msgid "The :class:`User` the profile belongs to." -msgstr "このプロフィールを持つ :class:`User` 。" - -#: ../../api.rst:867 -msgid "A boolean indicating if the user has premium (i.e. Discord Nitro)." -msgstr "このユーザーがプレミアム(つまり: Discord Nitro)を持っているかを示す真偽値。" - -#: ../../api.rst:872 -msgid "An alias for :attr:`premium`." -msgstr ":attr:`premium` のエイリアス。" - -#: ../../api.rst:875 -msgid "" -"A naive UTC datetime indicating how long the user has been premium since." -" This could be ``None`` if not applicable." -msgstr "プレミアムを有効にした日時を表すtimezone naiveなUTC datetime。利用できない場合は ``None`` になります。" - -#: ../../api.rst:881 -msgid "A boolean indicating if the user is Discord Staff." -msgstr "ユーザーがDiscordのスタッフかを示す真偽値。" - -#: ../../api.rst:886 -msgid "A boolean indicating if the user is a Discord Partner." -msgstr "ユーザーがDiscordパートナーかを示す真偽値。" - -#: ../../api.rst:891 -msgid "A boolean indicating if the user is a Bug Hunter." -msgstr "ユーザーがバグハンターかを示す真偽値。" - -#: ../../api.rst:896 -msgid "A boolean indicating if the user has had premium before 10 October, 2018." -msgstr "ユーザーが2018年10月10日以前にNitroを持っていたかを示す真偽値。" - -#: ../../api.rst:901 -msgid "A boolean indicating if the user is in Discord HypeSquad." -msgstr "ユーザーがDiscord HypeSquadに属しているかを示す真偽値。" - -#: ../../api.rst:906 -msgid "A list of :class:`HypeSquadHouse` that the user is in." -msgstr "ユーザーが所属する :class:`HypeSquadHouse` のリスト。" - -#: ../../api.rst:908 -msgid "List[:class:`HypeSquadHouse`]" -msgstr "" - -#: ../../api.rst:911 -#, fuzzy -msgid "A boolean indicating if the user is in part of a team." -msgstr "ユーザーがDiscordのスタッフかを示す真偽値。" - -#: ../../api.rst:919 -#, fuzzy -msgid "" -"A boolean indicating if the user is officially part of the Discord urgent" -" message system." -msgstr "ユーザーがDiscordパートナーかを示す真偽値。" - -#: ../../api.rst:927 -msgid "" -"A list of :class:`Guild` that the :class:`ClientUser` shares with this " -"user." -msgstr ":class:`ClientUser` がこのユーザーと共有する :class:`Guild` の一覧。" - -#: ../../api.rst:930 -#, fuzzy -msgid "List[:class:`Guild`]" -msgstr ":class:`.Guild`" - -#: ../../api.rst:934 -msgid "A list of dict objects indicating the accounts the user has connected." -msgstr "ユーザーが関連付けたアカウントを示す辞書型のリスト。" - -#: ../../api.rst:936 -msgid "An example entry can be seen below: ::" -msgstr "以下がその例です: ::" - -#: ../../api.rst:940 -msgid "List[Dict[:class:`str`, :class:`str`]]" -msgstr "" - -#: ../../api.rst:945 -msgid "Enumerations" -msgstr "列挙型" - -#: ../../api.rst:947 -msgid "" -"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." -msgstr "APIは、文字列が将来変わることに備え、文字列を直書きするのを防ぐために、いくらかの文字列の列挙型を提供します。" - -#: ../../api.rst:950 -msgid "" -"All enumerations are subclasses of an internal class which mimics the " -"behaviour of :class:`enum.Enum`." -msgstr "列挙型はすべて :class:`enum.Enum` の動作を模倣した内部クラスのサブクラスです。" - -#: ../../api.rst:955 -msgid "Specifies the type of channel." -msgstr "特定チャンネルのチャンネルタイプ。" - -#: ../../api.rst:959 -msgid "A text channel." -msgstr "テキストチャンネル。" - -#: ../../api.rst:962 -msgid "A voice channel." -msgstr "ボイスチャンネル。" - -#: ../../api.rst:965 -msgid "A private text channel. Also called a direct message." -msgstr "プライベートのテキストチャンネル。ダイレクトメッセージとも呼ばれています。" - -#: ../../api.rst:968 -msgid "A private group text channel." -msgstr "プライベートのグループDM。" - -#: ../../api.rst:971 -#, fuzzy -msgid "A category channel." -msgstr "テキストチャンネル。" - -#: ../../api.rst:974 -msgid "A guild news channel." -msgstr "ギルドのニュースチャンネル。" - -#: ../../api.rst:978 -msgid "A guild store channel." -msgstr "ギルドのストアチャンネル。" - -#: ../../api.rst:982 -msgid "" -"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." -msgstr ":class:`Message` のタイプを指定します。これは、メッセージが通常のものかシステムメッセージかを判断するのに使用できます。" - -#: ../../api.rst:989 -#, fuzzy -msgid "Checks if two messages are equal." -msgstr "二つのユーザーが等しいかを比較します。" - -#: ../../api.rst:992 -#, fuzzy -msgid "Checks if two messages are not equal." -msgstr "二つのユーザーが等しいものではないか比較します。" - -#: ../../api.rst:996 -msgid "The default message type. This is the same as regular messages." -msgstr "デフォルトのメッセージ。これは通常のメッセージと同じです。" - -#: ../../api.rst:999 -msgid "" -"The system message when a recipient is added to a group private message, " -"i.e. a private channel of type :attr:`ChannelType.group`." -msgstr "" -"グループのプライベートメッセージ、つまり、 :attr:`ChannelType.group` " -"のプライベートチャンネルの参加者が増えたときのシステムメッセージ。" - -#: ../../api.rst:1003 -msgid "" -"The system message when a recipient is removed from a group private " -"message, i.e. a private channel of type :attr:`ChannelType.group`." -msgstr "" -"グループのプライベートメッセージ、つまり、 :attr:`ChannelType.group` " -"のプライベートチャンネルの参加者が減ったときのシステムメッセージ。" - -#: ../../api.rst:1007 -msgid "" -"The system message denoting call state, e.g. missed call, started call, " -"etc." -msgstr "通話の状態を示すシステムメッセージ。例: 不在着信、通話の開始、その他。" - -#: ../../api.rst:1011 -msgid "The system message denoting that a channel's name has been changed." -msgstr "チャンネル名の変更を示すシステムメッセージ。" - -#: ../../api.rst:1014 -msgid "The system message denoting that a channel's icon has been changed." -msgstr "チャンネルのアイコンの変更を示すシステムメッセージ。" - -#: ../../api.rst:1017 -msgid "" -"The system message denoting that a pinned message has been added to a " -"channel." -msgstr "ピン留めの追加を示すシステムメッセージ。" - -#: ../../api.rst:1020 -msgid "The system message denoting that a new member has joined a Guild." -msgstr "ギルドの新規メンバーの参加を示すシステムメッセージ。" - -#: ../../api.rst:1024 -msgid "The system message denoting that a member has \"nitro boosted\" a guild." -msgstr "メンバーがギルドを「ニトロブースト」したことを表すシステムメッセージ。" - -#: ../../api.rst:1027 -msgid "" -"The system message denoting that a member has \"nitro boosted\" a guild " -"and it achieved level 1." -msgstr "メンバーがギルドを「ニトロブースト」し、それによってギルドがレベル1に到達したことを表すシステムメッセージ。" - -#: ../../api.rst:1031 -msgid "" -"The system message denoting that a member has \"nitro boosted\" a guild " -"and it achieved level 2." -msgstr "メンバーがギルドを「ニトロブースト」し、それによってギルドがレベル2に到達したことを表すシステムメッセージ。" - -#: ../../api.rst:1035 -msgid "" -"The system message denoting that a member has \"nitro boosted\" a guild " -"and it achieved level 3." -msgstr "メンバーがギルドを「ニトロブースト」し、それによってギルドがレベル3に到達したことを表すシステムメッセージ。" - -#: ../../api.rst:1039 -#, fuzzy -msgid "" -"The system message denoting that an announcement channel has been " -"followed." -msgstr "チャンネル名の変更を示すシステムメッセージ。" - -#: ../../api.rst:1045 -msgid "" -"Specifies the type of :class:`Activity`. This is used to check how to " -"interpret the activity itself." -msgstr ":class:`Activity` のタイプを指定します。これはアクティビティをどう解釈するか確認するために使われます。" - -#: ../../api.rst:1050 -msgid "An unknown activity type. This should generally not happen." -msgstr "不明なアクティビティタイプ。これは通常起こらないはずです。" - -#: ../../api.rst:1053 -msgid "A \"Playing\" activity type." -msgstr "プレイ中のアクティビティタイプ。" - -#: ../../api.rst:1056 -msgid "A \"Streaming\" activity type." -msgstr "放送中のアクティビティタイプ。" - -#: ../../api.rst:1059 -msgid "A \"Listening\" activity type." -msgstr "再生中のアクティビティタイプ。" - -#: ../../api.rst:1062 -msgid "A \"Watching\" activity type." -msgstr "視聴中のアクティビティタイプ。" - -#: ../../api.rst:1065 -#, fuzzy -msgid "A custom activity type." -msgstr "放送中のアクティビティタイプ。" - -#: ../../api.rst:1068 -#, fuzzy -msgid "A competing activity type." -msgstr "視聴中のアクティビティタイプ。" - -#: ../../api.rst:1074 -msgid "Specifies the HypeSquad house a user belongs to." -msgstr "ユーザーが属するHypeSquadハウスを指定します。" - -#: ../../api.rst:1078 -msgid "The \"Bravery\" house." -msgstr "Braveryのハウス。" - -#: ../../api.rst:1081 -msgid "The \"Brilliance\" house." -msgstr "Brillianceのハウス。" - -#: ../../api.rst:1084 -msgid "The \"Balance\" house." -msgstr "Balanceのハウス。" - -#: ../../api.rst:1088 -msgid "Specifies the region a voice server belongs to." -msgstr "ボイスサーバーのリージョンを指定します。" - -#: ../../api.rst:1092 -msgid "The Amsterdam region." -msgstr "アムステルダムリージョン。" - -#: ../../api.rst:1095 -msgid "The Brazil region." -msgstr "ブラジルリージョン。" - -#: ../../api.rst:1098 -#, fuzzy -msgid "The Dubai region." -msgstr "インドリージョン。" - -#: ../../api.rst:1104 -msgid "The EU Central region." -msgstr "中央ヨーロッパのリージョン。" - -#: ../../api.rst:1107 -msgid "The EU West region." -msgstr "東ヨーロッパのリージョン。" - -#: ../../api.rst:1110 -#, fuzzy -msgid "The Europe region." -msgstr "日本リージョン。" - -#: ../../api.rst:1116 -msgid "The Frankfurt region." -msgstr "フランクフルトリージョン。" - -#: ../../api.rst:1119 -msgid "The Hong Kong region." -msgstr "香港リージョン。" - -#: ../../api.rst:1122 -msgid "The India region." -msgstr "インドリージョン。" - -#: ../../api.rst:1128 -msgid "The Japan region." -msgstr "日本リージョン。" - -#: ../../api.rst:1131 -msgid "The London region." -msgstr "ロンドンリージョン。" - -#: ../../api.rst:1134 -msgid "The Russia region." -msgstr "ロシアリージョン。" - -#: ../../api.rst:1137 -msgid "The Singapore region." -msgstr "シンガポールリージョン。" - -#: ../../api.rst:1140 -msgid "The South Africa region." -msgstr "南アフリカリージョン。" - -#: ../../api.rst:1143 -#, fuzzy -msgid "The South Korea region." -msgstr "南アフリカリージョン。" - -#: ../../api.rst:1146 -msgid "The Sydney region." -msgstr "シドニーリージョン。" - -#: ../../api.rst:1149 -msgid "The US Central region." -msgstr "中央アメリカのリージョン。" - -#: ../../api.rst:1152 -msgid "The US East region." -msgstr "アメリカ西部のリージョン。" - -#: ../../api.rst:1155 -msgid "The US South region." -msgstr "アメリカ南部のリージョン。" - -#: ../../api.rst:1158 -msgid "The US West region." -msgstr "アメリカ東部のリージョン。" - -#: ../../api.rst:1161 -msgid "The Amsterdam region for VIP guilds." -msgstr "VIPギルド用のアムステルダムリージョン。" - -#: ../../api.rst:1164 -msgid "The US East region for VIP guilds." -msgstr "VIPギルド用のアメリカ東部リージョン。" - -#: ../../api.rst:1167 -msgid "The US West region for VIP guilds." -msgstr "VIPギルド用のアメリカ西部リージョン。" - -#: ../../api.rst:1171 -msgid "" -"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." -msgstr ":class:`Guild` の認証レベルを指定します。これは、メンバーがギルドにメッセージを送信できるようになるまでの条件です。" - -#: ../../api.rst:1178 -msgid "Checks if two verification levels are equal." -msgstr "認証レベルが等しいか確認します。" - -#: ../../api.rst:1181 -msgid "Checks if two verification levels are not equal." -msgstr "認証レベルが等しくないか確認します。" - -#: ../../api.rst:1184 -msgid "Checks if a verification level is higher than another." -msgstr "認証レベルがあるレベルより厳しいか確認します。" - -#: ../../api.rst:1187 -msgid "Checks if a verification level is lower than another." -msgstr "認証レベルがあるレベルより緩いか確認します。" - -#: ../../api.rst:1190 -msgid "Checks if a verification level is higher or equal to another." -msgstr "認証レベルがあるレベルと同じ、又は厳しいか確認します。" - -#: ../../api.rst:1193 -msgid "Checks if a verification level is lower or equal to another." -msgstr "認証レベルがあるレベルと同じ、又は緩いか確認します。" - -#: ../../api.rst:1197 -msgid "No criteria set." -msgstr "無制限。" - -#: ../../api.rst:1200 -msgid "Member must have a verified email on their Discord account." -msgstr "メンバーはDiscordアカウントのメール認証を済ませないといけません。" - -#: ../../api.rst:1203 -msgid "" -"Member must have a verified email and be registered on Discord for more " -"than five minutes." -msgstr "メンバーはメール認証をし、かつアカウント登録から5分経過しないといけません。" - -#: ../../api.rst:1207 -msgid "" -"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." -msgstr "メンバーはメール認証をし、Discordのアカウント登録から5分経過し、かつ10分以上ギルドに所属していないといけません。" - -#: ../../api.rst:1212 -msgid "An alias for :attr:`high`." -msgstr ":attr:`high` のエイリアス。" - -#: ../../api.rst:1215 -msgid "Member must have a verified phone on their Discord account." -msgstr "メンバーはDiscordアカウントの電話番号認証を済ませないといけません。" - -#: ../../api.rst:1219 ../../api.rst:1223 -msgid "An alias for :attr:`extreme`." -msgstr ":attr:`extreme` のエイリアス。" - -#: ../../api.rst:1229 -msgid "" -"Specifies whether a :class:`Guild` has notifications on for all messages " -"or mentions only by default." -msgstr ":class:`Guild` の通知対象のデフォルト設定をすべてのメッセージ、またはメンションのみに指定します。" - -#: ../../api.rst:1233 -msgid "" -"Members receive notifications for every message regardless of them being " -"mentioned." -msgstr "メンバーは、メンションされているかどうかに関わらず、すべてのメッセージの通知を受け取ります。" - -#: ../../api.rst:1236 -msgid "Members receive notifications for messages they are mentioned in." -msgstr "メンバーは自分がメンションされているメッセージの通知のみ受け取ります。" - -#: ../../api.rst:1240 -msgid "" -"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." -msgstr "" -":class:`Guild` " -"の不適切な表現のフィルターを指定します。これはDiscordがポルノ画像や不適切な表現を検出するために使用している機械学習アルゴリズムです。" - -#: ../../api.rst:1248 -msgid "Checks if two content filter levels are equal." -msgstr "表現のフィルターのレベルが等しいか確認します。" - -#: ../../api.rst:1251 -msgid "Checks if two content filter levels are not equal." -msgstr "表現のフィルターのレベルが等しくないか確認します。" - -#: ../../api.rst:1254 -msgid "Checks if a content filter level is higher than another." -msgstr "表現のフィルターのレベルが他のレベルより大きいか確認します。" - -#: ../../api.rst:1257 -msgid "Checks if a content filter level is lower than another." -msgstr "表現のフィルターのレベルが他のレベルより小さいか確認します。" - -#: ../../api.rst:1260 -msgid "Checks if a content filter level is higher or equal to another." -msgstr "表現のフィルターのレベルが他のレベルより大きい、または等しいか確認します。" - -#: ../../api.rst:1263 -msgid "Checks if a content filter level is lower or equal to another." -msgstr "表現のフィルターのレベルが他のレベルより小さい、または等しいか確認します。" - -#: ../../api.rst:1267 -msgid "The guild does not have the content filter enabled." -msgstr "ギルドで表現のフィルターが有効ではない。" - -#: ../../api.rst:1270 -msgid "The guild has the content filter enabled for members without a role." -msgstr "ギルドで役職を持たないメンバーに対して表現のフィルターが有効化されている。" - -#: ../../api.rst:1273 -msgid "The guild has the content filter enabled for every member." -msgstr "ギルドで、すべてのメンバーに対して表現のフィルターが有効化されている。" - -#: ../../api.rst:1277 -msgid "Specifies a :class:`Member` 's status." -msgstr ":class:`Member` のステータスを指定します。" - -#: ../../api.rst:1281 -msgid "The member is online." -msgstr "メンバーがオンライン。" - -#: ../../api.rst:1284 -msgid "The member is offline." -msgstr "メンバーがオフライン。" - -#: ../../api.rst:1287 -msgid "The member is idle." -msgstr "メンバーメンバーが退席中。" - -#: ../../api.rst:1290 -msgid "The member is \"Do Not Disturb\"." -msgstr "メンバーが取り込み中。" - -#: ../../api.rst:1293 -msgid "An alias for :attr:`dnd`." -msgstr ":attr:`dnd` のエイリアス。" - -#: ../../api.rst:1296 -msgid "" -"The member is \"invisible\". In reality, this is only used in sending a " -"presence a la :meth:`Client.change_presence`. When you receive a user's " -"presence this will be :attr:`offline` instead." -msgstr "" -"メンバーがオンライン状態を隠す。実際には、これは :meth:`Client.change_presence` " -"でプレゼンスを送信する時のみ使用します。ユーザーのプレゼンスを受け取った場合、これは :attr:`offline` に置き換えられます。" - -#: ../../api.rst:1303 -msgid "" -"Represents the type of action being done for a :class:`AuditLogEntry`\\, " -"which is retrievable via :meth:`Guild.audit_logs`." -msgstr "" -":class:`AuditLogEntry` で行われた動作の種類を取得します。AuditLogEntryは " -":meth:`Guild.audit_logs` で取得可能です。" - -#: ../../api.rst:1308 -msgid "The guild has updated. Things that trigger this include:" -msgstr "ギルドが更新された。このトリガーとなるものは以下のとおりです。" - -#: ../../api.rst:1310 -msgid "Changing the guild vanity URL" -msgstr "ギルドのvanity URLの変更" - -#: ../../api.rst:1311 -msgid "Changing the guild invite splash" -msgstr "ギルドの招待時のスプラッシュ画像の変更" - -#: ../../api.rst:1312 -msgid "Changing the guild AFK channel or timeout" -msgstr "ギルドのAFKチャンネル、またはタイムアウトの変更" - -#: ../../api.rst:1313 -msgid "Changing the guild voice server region" -msgstr "ギルドの音声通話のサーバーリージョンの変更" - -#: ../../api.rst:1314 -msgid "Changing the guild icon" -msgstr "ギルドのアイコンの変更" - -#: ../../api.rst:1315 -msgid "Changing the guild moderation settings" -msgstr "ギルドの管理設定の変更" - -#: ../../api.rst:1316 -msgid "Changing things related to the guild widget" -msgstr "ギルドのウィジェットに関連するものの変更" - -#: ../../api.rst:1318 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Guild`." -msgstr "これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeは :class:`Guild`になります。" - -#: ../../api.rst:1321 ../../api.rst:1344 ../../api.rst:1363 ../../api.rst:1382 -#: ../../api.rst:1401 ../../api.rst:1417 ../../api.rst:1432 ../../api.rst:1491 -#: ../../api.rst:1505 ../../api.rst:1550 ../../api.rst:1570 ../../api.rst:1585 -#: ../../api.rst:1600 ../../api.rst:1624 ../../api.rst:1641 ../../api.rst:1657 -#: ../../api.rst:1669 ../../api.rst:1682 ../../api.rst:1693 ../../api.rst:1704 -msgid "Possible attributes for :class:`AuditLogDiff`:" -msgstr ":class:`AuditLogDiff` から、以下の属性を参照できます:" - -#: ../../api.rst:1323 -msgid ":attr:`~AuditLogDiff.afk_channel`" -msgstr ":attr:`~AuditLogDiff.afk_channel`" - -#: ../../api.rst:1324 -msgid ":attr:`~AuditLogDiff.system_channel`" -msgstr ":attr:`~AuditLogDiff.system_channel`" - -#: ../../api.rst:1325 -msgid ":attr:`~AuditLogDiff.afk_timeout`" -msgstr ":attr:`~AuditLogDiff.afk_timeout`" - -#: ../../api.rst:1326 -msgid ":attr:`~AuditLogDiff.default_message_notifications`" -msgstr ":attr:`~AuditLogDiff.default_message_notifications`" - -#: ../../api.rst:1327 -msgid ":attr:`~AuditLogDiff.explicit_content_filter`" -msgstr ":attr:`~AuditLogDiff.explicit_content_filter`" - -#: ../../api.rst:1328 -msgid ":attr:`~AuditLogDiff.mfa_level`" -msgstr ":attr:`~AuditLogDiff.mfa_level`" - -#: ../../api.rst:1329 ../../api.rst:1346 ../../api.rst:1365 ../../api.rst:1384 -#: ../../api.rst:1555 ../../api.rst:1575 ../../api.rst:1590 ../../api.rst:1644 -#: ../../api.rst:1660 ../../api.rst:1672 ../../api.rst:1684 ../../api.rst:1695 -#: ../../api.rst:1706 -msgid ":attr:`~AuditLogDiff.name`" -msgstr ":attr:`~AuditLogDiff.name`" - -#: ../../api.rst:1330 -msgid ":attr:`~AuditLogDiff.owner`" -msgstr ":attr:`~AuditLogDiff.owner`" - -#: ../../api.rst:1331 -msgid ":attr:`~AuditLogDiff.splash`" -msgstr ":attr:`~AuditLogDiff.splash`" - -#: ../../api.rst:1332 -msgid ":attr:`~AuditLogDiff.vanity_url_code`" -msgstr ":attr:`~AuditLogDiff.vanity_url_code`" - -#: ../../api.rst:1336 -msgid "A new channel was created." -msgstr "チャンネルが作成されました。" - -#: ../../api.rst:1338 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is " -"either a :class:`abc.GuildChannel` or :class:`Object` with an ID." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、IDが設定されている " -":class:`abc.GuildChannel` か、 :class:`Object` のいずれかになります。" - -#: ../../api.rst:1341 -msgid "" -"A more filled out object in the :class:`Object` case can be found by " -"using :attr:`~AuditLogEntry.after`." -msgstr "" -":class:`Object` の場合、 :attr:`~AuditLogEntry.after` " -"を使用して、より詳細な情報を持つオブジェクトを見つけることができます。" - -#: ../../api.rst:1347 ../../api.rst:1366 ../../api.rst:1385 ../../api.rst:1406 -#: ../../api.rst:1422 ../../api.rst:1437 -msgid ":attr:`~AuditLogDiff.type`" -msgstr ":attr:`~AuditLogDiff.type`" - -#: ../../api.rst:1348 ../../api.rst:1368 ../../api.rst:1386 -msgid ":attr:`~AuditLogDiff.overwrites`" -msgstr ":attr:`~AuditLogDiff.overwrites`" - -#: ../../api.rst:1352 -msgid "A channel was updated. Things that trigger this include:" -msgstr "チャンネルが更新されました。これのトリガーとなるものは以下の通りです。" - -#: ../../api.rst:1354 -msgid "The channel name or topic was changed" -msgstr "チャンネルのチャンネルトピックの変更、または名前の変更。" - -#: ../../api.rst:1355 -msgid "The channel bitrate was changed" -msgstr "チャンネルのビットレートの変更。" - -#: ../../api.rst:1357 ../../api.rst:1392 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`abc.GuildChannel` or :class:`Object` with an ID." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、IDが設定されている " -":class:`abc.GuildChannel` か、 :class:`Object` のいずれかになります。" - -#: ../../api.rst:1360 -msgid "" -"A more filled out object in the :class:`Object` case can be found by " -"using :attr:`~AuditLogEntry.after` or :attr:`~AuditLogEntry.before`." -msgstr "" -":class:`Object` の場合、 :attr:`~AuditLogEntry.after` または " -":attr:`~AuditLogEntry.before` を使用して、より詳細な情報を持つオブジェクトを見つけることができます。" - -#: ../../api.rst:1367 -msgid ":attr:`~AuditLogDiff.position`" -msgstr ":attr:`~AuditLogDiff.position`" - -#: ../../api.rst:1369 -msgid ":attr:`~AuditLogDiff.topic`" -msgstr ":attr:`~AuditLogDiff.topic`" - -#: ../../api.rst:1370 -msgid ":attr:`~AuditLogDiff.bitrate`" -msgstr ":attr:`~AuditLogDiff.bitrate`" - -#: ../../api.rst:1374 -msgid "A channel was deleted." -msgstr "チャンネルの削除。" - -#: ../../api.rst:1376 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is an " -":class:`Object` with an ID." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、IDが設定されている " -":class:`Object` になります。" - -#: ../../api.rst:1379 -msgid "" -"A more filled out object can be found by using the " -":attr:`~AuditLogEntry.before` object." -msgstr "" - -#: ../../api.rst:1390 -msgid "A channel permission overwrite was created." -msgstr "チャンネルにおける権限の上書き設定の作成。" - -#: ../../api.rst:1395 -msgid "" -"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." -msgstr "" -"この場合には、 :attr:`~AuditLogEntry.extra` は :class:`Role` か :class:`Member` " -"です。もしオブジェクトが見つからない場合はid、name、 ``'role'`` か ``'member'`` である``type`` 属性がある" -" :class:`Object` です。" - -#: ../../api.rst:1403 ../../api.rst:1419 ../../api.rst:1434 -msgid ":attr:`~AuditLogDiff.deny`" -msgstr ":attr:`~AuditLogDiff.deny`" - -#: ../../api.rst:1404 ../../api.rst:1420 ../../api.rst:1435 -msgid ":attr:`~AuditLogDiff.allow`" -msgstr ":attr:`~AuditLogDiff.allow`" - -#: ../../api.rst:1405 ../../api.rst:1421 ../../api.rst:1436 -msgid ":attr:`~AuditLogDiff.id`" -msgstr ":attr:`~AuditLogDiff.id`" - -#: ../../api.rst:1410 -msgid "" -"A channel permission overwrite was changed, this is typically when the " -"permission values change." -msgstr "チャンネルの権限の上書きが変更されました。典型的な例は、権限が変更された場合です。" - -#: ../../api.rst:1413 ../../api.rst:1428 -msgid "" -"See :attr:`overwrite_create` for more information on how the " -":attr:`~AuditLogEntry.target` and :attr:`~AuditLogEntry.extra` fields are" -" set." -msgstr "" -":attr:`overwrite_create` に、 :attr:`~AuditLogEntry.target` と " -":attr:`~AuditLogEntry.extra` についての説明があります。" - -#: ../../api.rst:1426 -msgid "A channel permission overwrite was deleted." -msgstr "チャンネルにおける権限の上書き設定の削除。" - -#: ../../api.rst:1441 -msgid "A member was kicked." -msgstr "メンバーのキック。" - -#: ../../api.rst:1443 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`User` who got kicked." -msgstr "" -"これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeはキックされたユーザーに該当する " -":class:`User` になります。" - -#: ../../api.rst:1446 ../../api.rst:1461 ../../api.rst:1470 ../../api.rst:1479 -msgid "When this is the action, :attr:`~AuditLogEntry.changes` is empty." -msgstr "これが上記のactionなら、:attr:`~AuditLogEntry.changes` は空になります。" - -#: ../../api.rst:1450 -msgid "A member prune was triggered." -msgstr "非アクティブメンバーの一括キック。" - -#: ../../api.rst:1452 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is set" -" to ``None``." -msgstr "これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeは ``None`` に設定されます。" - -#: ../../api.rst:1455 ../../api.rst:1514 ../../api.rst:1716 ../../api.rst:1743 -#: ../../api.rst:1758 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.extra` is set " -"to an unspecified proxy object with two attributes:" -msgstr "" - -#: ../../api.rst:1458 -msgid "``delete_members_days``: An integer specifying how far the prune was." -msgstr "" - -#: ../../api.rst:1459 -msgid "``members_removed``: An integer specifying how many members were removed." -msgstr "" - -#: ../../api.rst:1465 -msgid "A member was banned." -msgstr "メンバーのBAN。" - -#: ../../api.rst:1467 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`User` who got banned." -msgstr "" -"これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeはBANされたユーザーに該当する " -":class:`User` になります。" - -#: ../../api.rst:1474 -msgid "A member was unbanned." -msgstr "メンバーのBANの解除。" - -#: ../../api.rst:1476 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`User` who got unbanned." -msgstr "" -"これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeはBANが解除されたユーザーに該当する " -":class:`User` になります。" - -#: ../../api.rst:1483 -msgid "A member has updated. This triggers in the following situations:" -msgstr "メンバーの何らかの更新。これのトリガーとなるのは以下の場合です:" - -#: ../../api.rst:1485 -msgid "A nickname was changed" -msgstr "メンバーのニックネームの変更。" - -#: ../../api.rst:1486 -msgid "They were server muted or deafened (or it was undo'd)" -msgstr "" - -#: ../../api.rst:1488 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Member` or :class:`User` who got updated." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、更新の行われた " -":class:`Member` あるいは :class:`User` になります。" - -#: ../../api.rst:1493 -msgid ":attr:`~AuditLogDiff.nick`" -msgstr ":attr:`~AuditLogDiff.nick`" - -#: ../../api.rst:1494 -msgid ":attr:`~AuditLogDiff.mute`" -msgstr ":attr:`~AuditLogDiff.mute`" - -#: ../../api.rst:1495 -msgid ":attr:`~AuditLogDiff.deaf`" -msgstr ":attr:`~AuditLogDiff.deaf`" - -#: ../../api.rst:1499 -msgid "" -"A member's role has been updated. This triggers when a member either " -"gains a role or losses a role." -msgstr "" - -#: ../../api.rst:1502 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Member` or :class:`User` who got the role." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、役職の更新が行われた " -":class:`Member` あるいは :class:`User` になります。" - -#: ../../api.rst:1507 -msgid ":attr:`~AuditLogDiff.roles`" -msgstr ":attr:`~AuditLogDiff.roles`" - -#: ../../api.rst:1511 -msgid "" -"A member's voice channel has been updated. This triggers when a member is" -" moved to a different voice channel." -msgstr "" - -#: ../../api.rst:1517 -msgid "" -"``channel``: A :class:`TextChannel` or :class:`Object` with the channel " -"ID where the members were moved." -msgstr "" - -#: ../../api.rst:1518 -msgid "``count``: An integer specifying how many members were moved." -msgstr "" - -#: ../../api.rst:1524 -msgid "" -"A member's voice state has changed. This triggers when a member is force " -"disconnected from voice." -msgstr "" - -#: ../../api.rst:1527 ../../api.rst:1729 -#, fuzzy -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.extra` is set " -"to an unspecified proxy object with one attribute:" -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、IDが設定されている " -":class:`Object` になります。" - -#: ../../api.rst:1530 -msgid "``count``: An integer specifying how many members were disconnected." -msgstr "" - -#: ../../api.rst:1536 -msgid "A bot was added to the guild." -msgstr "" - -#: ../../api.rst:1538 -#, fuzzy -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Member` or :class:`User` which was added to the guild." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、役職の更新が行われた " -":class:`Member` あるいは :class:`User` になります。" - -#: ../../api.rst:1545 -msgid "A new role was created." -msgstr "新しい役職の作成。" - -#: ../../api.rst:1547 ../../api.rst:1567 ../../api.rst:1582 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Role` or a :class:`Object` with the ID." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、IDが設定されている " -":class:`Role` か、 :class:`Object` のいずれかになります。" - -#: ../../api.rst:1552 ../../api.rst:1572 ../../api.rst:1587 -msgid ":attr:`~AuditLogDiff.colour`" -msgstr ":attr:`~AuditLogDiff.colour`" - -#: ../../api.rst:1553 ../../api.rst:1573 ../../api.rst:1588 -msgid ":attr:`~AuditLogDiff.mentionable`" -msgstr ":attr:`~AuditLogDiff.mentionable`" - -#: ../../api.rst:1554 ../../api.rst:1574 ../../api.rst:1589 -msgid ":attr:`~AuditLogDiff.hoist`" -msgstr ":attr:`~AuditLogDiff.hoist`" - -#: ../../api.rst:1556 ../../api.rst:1576 ../../api.rst:1591 -msgid ":attr:`~AuditLogDiff.permissions`" -msgstr ":attr:`~AuditLogDiff.permissions`" - -#: ../../api.rst:1560 -msgid "A role was updated. This triggers in the following situations:" -msgstr "役職の何らかの更新。これのトリガーとなるのは以下の場合です:" - -#: ../../api.rst:1562 -msgid "The name has changed" -msgstr "名前の更新。" - -#: ../../api.rst:1563 -msgid "The permissions have changed" -msgstr "" - -#: ../../api.rst:1564 -msgid "The colour has changed" -msgstr "" - -#: ../../api.rst:1565 -msgid "Its hoist/mentionable state has changed" -msgstr "" - -#: ../../api.rst:1580 -msgid "A role was deleted." -msgstr "役職の削除。" - -#: ../../api.rst:1595 -msgid "An invite was created." -msgstr "招待の作成。" - -#: ../../api.rst:1597 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Invite` that was created." -msgstr "" -"これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeは作成された招待に該当する " -":class:`Invite` になります。" - -#: ../../api.rst:1602 ../../api.rst:1626 -msgid ":attr:`~AuditLogDiff.max_age`" -msgstr ":attr:`~AuditLogDiff.max_age`" - -#: ../../api.rst:1603 ../../api.rst:1627 -msgid ":attr:`~AuditLogDiff.code`" -msgstr ":attr:`~AuditLogDiff.code`" - -#: ../../api.rst:1604 ../../api.rst:1628 -msgid ":attr:`~AuditLogDiff.temporary`" -msgstr ":attr:`~AuditLogDiff.temporary`" - -#: ../../api.rst:1605 ../../api.rst:1629 -msgid ":attr:`~AuditLogDiff.inviter`" -msgstr ":attr:`~AuditLogDiff.inviter`" - -#: ../../api.rst:1606 ../../api.rst:1630 ../../api.rst:1643 ../../api.rst:1659 -#: ../../api.rst:1671 -msgid ":attr:`~AuditLogDiff.channel`" -msgstr ":attr:`~AuditLogDiff.channel`" - -#: ../../api.rst:1607 ../../api.rst:1631 -msgid ":attr:`~AuditLogDiff.uses`" -msgstr ":attr:`~AuditLogDiff.uses`" - -#: ../../api.rst:1608 ../../api.rst:1632 -msgid ":attr:`~AuditLogDiff.max_uses`" -msgstr ":attr:`~AuditLogDiff.max_uses`" - -#: ../../api.rst:1612 -msgid "An invite was updated." -msgstr "招待の更新。" - -#: ../../api.rst:1614 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Invite` that was updated." -msgstr "" - -#: ../../api.rst:1619 -msgid "An invite was deleted." -msgstr "" - -#: ../../api.rst:1621 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Invite` that was deleted." -msgstr "" - -#: ../../api.rst:1636 -msgid "A webhook was created." -msgstr "" - -#: ../../api.rst:1638 ../../api.rst:1654 ../../api.rst:1666 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Object` with the webhook ID." -msgstr "" - -#: ../../api.rst:1645 ../../api.rst:1673 -msgid ":attr:`~AuditLogDiff.type` (always set to ``1`` if so)" -msgstr "" - -#: ../../api.rst:1649 -msgid "A webhook was updated. This trigger in the following situations:" -msgstr "" - -#: ../../api.rst:1651 -msgid "The webhook name changed" -msgstr "" - -#: ../../api.rst:1652 -msgid "The webhook channel changed" -msgstr "" - -#: ../../api.rst:1664 -msgid "A webhook was deleted." -msgstr "" - -#: ../../api.rst:1677 -msgid "An emoji was created." -msgstr "" - -#: ../../api.rst:1679 ../../api.rst:1690 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Emoji` or :class:`Object` with the emoji ID." -msgstr "" - -#: ../../api.rst:1688 -msgid "An emoji was updated. This triggers when the name has changed." -msgstr "" - -#: ../../api.rst:1699 -msgid "An emoji was deleted." -msgstr "" - -#: ../../api.rst:1701 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Object` with the emoji ID." -msgstr "" - -#: ../../api.rst:1710 -msgid "" -"A message was deleted by a moderator. Note that this only triggers if the" -" message was deleted by someone other than the author." -msgstr "" - -#: ../../api.rst:1713 -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Member` or :class:`User` who had their message deleted." -msgstr "" - -#: ../../api.rst:1719 ../../api.rst:1732 -msgid "``count``: An integer specifying how many messages were deleted." -msgstr "" - -#: ../../api.rst:1720 -msgid "" -"``channel``: A :class:`TextChannel` or :class:`Object` with the channel " -"ID where the message got deleted." -msgstr "" - -#: ../../api.rst:1724 -msgid "Messages were bulk deleted by a moderator." -msgstr "" - -#: ../../api.rst:1726 -#, fuzzy -msgid "" -"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." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、IDが設定されている " -":class:`abc.GuildChannel` か、 :class:`Object` のいずれかになります。" - -#: ../../api.rst:1738 -#, fuzzy -msgid "A message was pinned in a channel." -msgstr "メッセージをピン留め、または解除した。" - -#: ../../api.rst:1740 -#, fuzzy -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Member` or :class:`User` who had their message pinned." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、役職の更新が行われた " -":class:`Member` あるいは :class:`User` になります。" - -#: ../../api.rst:1746 -msgid "" -"``channel``: A :class:`TextChannel` or :class:`Object` with the channel " -"ID where the message was pinned." -msgstr "" - -#: ../../api.rst:1747 -msgid "``message_id``: the ID of the message which was pinned." -msgstr "" - -#: ../../api.rst:1753 -#, fuzzy -msgid "A message was unpinned in a channel." -msgstr "ギルドチャンネルのメッセージがピン留めされたり、解除されたりしたときに呼び出されます。" - -#: ../../api.rst:1755 -#, fuzzy -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Member` or :class:`User` who had their message unpinned." -msgstr "" -"これが上記のactionならば、 :attr:`~AuditLogEntry.target` のtypeは、更新の行われた " -":class:`Member` あるいは :class:`User` になります。" - -#: ../../api.rst:1761 -msgid "" -"``channel``: A :class:`TextChannel` or :class:`Object` with the channel " -"ID where the message was unpinned." -msgstr "" - -#: ../../api.rst:1762 -msgid "``message_id``: the ID of the message which was unpinned." -msgstr "" - -#: ../../api.rst:1768 -#, fuzzy -msgid "A guild integration was created." -msgstr "招待の作成。" - -#: ../../api.rst:1770 -#, fuzzy -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Object` with the integration ID of the integration which was " -"created." -msgstr "" -"これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeは作成された招待に該当する " -":class:`Invite` になります。" - -#: ../../api.rst:1777 -#, fuzzy -msgid "A guild integration was updated." -msgstr "連携サービスが更新されたギルド。" - -#: ../../api.rst:1779 -#, fuzzy -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Object` with the integration ID of the integration which was " -"updated." -msgstr "" -"これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeは作成された招待に該当する " -":class:`Invite` になります。" - -#: ../../api.rst:1786 -#, fuzzy -msgid "A guild integration was deleted." -msgstr "連携サービスが更新されたギルド。" - -#: ../../api.rst:1788 -#, fuzzy -msgid "" -"When this is the action, the type of :attr:`~AuditLogEntry.target` is the" -" :class:`Object` with the integration ID of the integration which was " -"deleted." -msgstr "" -"これが上記のactionならば、:attr:`~AuditLogEntry.target` のtypeは作成された招待に該当する " -":class:`Invite` になります。" - -#: ../../api.rst:1795 -msgid "Represents the category that the :class:`AuditLogAction` belongs to." -msgstr "" - -#: ../../api.rst:1797 -msgid "This can be retrieved via :attr:`AuditLogEntry.category`." -msgstr "" - -#: ../../api.rst:1801 -msgid "The action is the creation of something." -msgstr "" - -#: ../../api.rst:1805 -msgid "The action is the deletion of something." -msgstr "" - -#: ../../api.rst:1809 -msgid "The action is the update of something." -msgstr "" - -#: ../../api.rst:1813 -msgid "Specifies the type of :class:`Relationship`." -msgstr "" - -#: ../../api.rst:1817 ../../api.rst:1843 ../../api.rst:1865 ../../api.rst:1894 -#: ../../api.rst:1911 -msgid "This only applies to users, *not* bots." -msgstr "" - -#: ../../api.rst:1821 -msgid "You are friends with this user." -msgstr "" - -#: ../../api.rst:1825 -msgid "You have blocked this user." -msgstr "このユーザーはブロックされています。" - -#: ../../api.rst:1829 -msgid "The user has sent you a friend request." -msgstr "フレンド申請が届いています。" - -#: ../../api.rst:1833 -msgid "You have sent a friend request to this user." -msgstr "" - -#: ../../api.rst:1838 -msgid "" -"Represents the options found in ``Settings > Privacy & Safety > Safe " -"Direct Messaging`` in the Discord client." -msgstr "" - -#: ../../api.rst:1847 -msgid "Scan all direct messages from everyone." -msgstr "" - -#: ../../api.rst:1851 -msgid "Scan all direct messages that aren't from friends." -msgstr "" - -#: ../../api.rst:1855 -msgid "Don't scan any direct messages." -msgstr "" - -#: ../../api.rst:1860 -msgid "" -"Represents the options found in ``Settings > Privacy & Safety > Who Can " -"Add You As A Friend`` in the Discord client." -msgstr "" - -#: ../../api.rst:1869 -msgid "This allows no-one to add you as a friend." -msgstr "" - -#: ../../api.rst:1873 -msgid "This allows guild members to add you as a friend." -msgstr "" - -#: ../../api.rst:1877 -msgid "This allows friends of friends to add you as a friend." -msgstr "" - -#: ../../api.rst:1881 -msgid "This is a superset of :attr:`mutual_guilds` and :attr:`mutual_friends`." -msgstr "" - -#: ../../api.rst:1885 -msgid "This allows everyone to add you as a friend." -msgstr "" - -#: ../../api.rst:1890 -msgid "Represents the user's Discord Nitro subscription type." -msgstr "" - -#: ../../api.rst:1898 -msgid "Represents the Discord Nitro with Nitro-exclusive games." -msgstr "" - -#: ../../api.rst:1902 -msgid "Represents the Discord Nitro with no Nitro-exclusive games." -msgstr "" - -#: ../../api.rst:1907 -msgid "Represents the theme synced across all Discord clients." -msgstr "" - -#: ../../api.rst:1915 -msgid "Represents the Light theme on Discord." -msgstr "Discordのライトテーマを表します。" - -#: ../../api.rst:1919 -msgid "Represents the Dark theme on Discord." -msgstr "Discordのダークテーマを表します。" - -#: ../../api.rst:1924 -msgid "" -"Represents the membership state of a team member retrieved through " -":func:`Bot.application_info`." -msgstr "" - -#: ../../api.rst:1930 -#, fuzzy -msgid "Represents an invited member." -msgstr "Discordの埋め込みを表します。" - -#: ../../api.rst:1934 -msgid "Represents a member currently in the team." -msgstr "" - -#: ../../api.rst:1938 -msgid "Represents the type of webhook that can be received." -msgstr "" - -#: ../../api.rst:1944 -msgid "Represents a webhook that can post messages to channels with a token." -msgstr "" - -#: ../../api.rst:1948 -msgid "" -"Represents a webhook that is internally managed by Discord, used for " -"following channels." -msgstr "" - -#: ../../api.rst:1952 -msgid "" -"Represents the behaviour the :class:`Integration` should perform when a " -"user's subscription has finished." -msgstr "" - -#: ../../api.rst:1955 -msgid "There is an alias for this called ``ExpireBehavior``." -msgstr "" - -#: ../../api.rst:1961 -msgid "" -"This will remove the :attr:`Integration.role` from the user when their " -"subscription is finished." -msgstr "" - -#: ../../api.rst:1966 -msgid "This will kick the user when their subscription is finished." -msgstr "" - -#: ../../api.rst:1970 -msgid "Represents the default avatar of a Discord :class:`User`" -msgstr "" - -#: ../../api.rst:1974 -msgid "" -"Represents the default avatar with the color blurple. See also " -":attr:`Colour.blurple`" -msgstr "" - -#: ../../api.rst:1978 -msgid "" -"Represents the default avatar with the color grey. See also " -":attr:`Colour.greyple`" -msgstr "" - -#: ../../api.rst:1982 -#, fuzzy -msgid "An alias for :attr:`grey`." -msgstr ":attr:`high` のエイリアス。" - -#: ../../api.rst:1985 -msgid "" -"Represents the default avatar with the color green. See also " -":attr:`Colour.green`" -msgstr "" - -#: ../../api.rst:1989 -msgid "" -"Represents the default avatar with the color orange. See also " -":attr:`Colour.orange`" -msgstr "" - -#: ../../api.rst:1993 -msgid "" -"Represents the default avatar with the color red. See also " -":attr:`Colour.red`" -msgstr "" - -#: ../../api.rst:1998 -msgid "Async Iterator" -msgstr "非同期イテレータ" - -#: ../../api.rst:2000 -msgid "" -"Some API functions return an \"async iterator\". An async iterator is " -"something that is capable of being used in an :ref:`async for statement " -"`." -msgstr "" -"一部のAPI関数では「非同期イテレータ」を返します。非同期イテレータは :ref:`async for 構文 ` " -"で使用できるものです。" - -#: ../../api.rst:2003 -msgid "These async iterators can be used as follows: ::" -msgstr "これら非同期イテレータは以下のようにして使用可能です: ::" - -#: ../../api.rst:2008 -msgid "" -"Certain utilities make working with async iterators easier, detailed " -"below." -msgstr "" - -#: ../../api.rst:2012 -msgid "" -"Represents the \"AsyncIterator\" concept. Note that no such class exists," -" it is purely abstract." -msgstr "" - -#: ../../api.rst:2019 -msgid "Iterates over the contents of the async iterator." -msgstr "" - -#: ../../api.rst:2027 -msgid "" -"Advances the iterator by one, if possible. If no more items are found " -"then this raises :exc:`NoMoreItems`." -msgstr "" - -#: ../../api.rst:2035 -msgid "Similar to :func:`utils.get` except run over the async iterator." -msgstr "" - -#: ../../api.rst:2037 -msgid "Getting the last message by a user named 'Dave' or ``None``: ::" -msgstr "" - -#: ../../api.rst:2046 -msgid "Similar to :func:`utils.find` except run over the async iterator." -msgstr "" - -#: ../../api.rst:2048 -msgid "" -"Unlike :func:`utils.find`\\, the predicate provided can be a " -"|coroutine_link|_." -msgstr "" - -#: ../../api.rst:2051 -msgid "Getting the last audit log with a reason or ``None``: ::" -msgstr "" - -#: ../../api.rst:2058 -msgid "The predicate to use. Could be a |coroutine_link|_." -msgstr "" - -#: ../../api.rst:2059 -msgid "The first element that returns ``True`` for the predicate or ``None``." -msgstr "" - -#: ../../api.rst:2066 -msgid "Flattens the async iterator into a :class:`list` with all the elements." -msgstr "" - -#: ../../api.rst:2068 -msgid "A list of every element in the async iterator." -msgstr "" - -#: ../../api.rst:2073 -msgid "" -"This is similar to the built-in :func:`map ` function. Another " -":class:`AsyncIterator` is returned that executes the function on every " -"element it is iterating over. This function can either be a regular " -"function or a |coroutine_link|_." -msgstr "" - -#: ../../api.rst:2078 -msgid "Creating a content iterator: ::" -msgstr "" - -#: ../../api.rst:2086 -msgid "The function to call on every element. Could be a |coroutine_link|_." -msgstr "" - -#: ../../api.rst:2087 ../../api.rst:2104 -#, fuzzy -msgid ":class:`AsyncIterator`" -msgstr ":class:`str`" - -#: ../../api.rst:2091 -msgid "" -"This is similar to the built-in :func:`filter ` function. " -"Another :class:`AsyncIterator` is returned that filters over the original" -" async iterator. This predicate can be a regular function or a " -"|coroutine_link|_." -msgstr "" - -#: ../../api.rst:2095 -msgid "Getting messages by non-bot accounts: ::" -msgstr "" - -#: ../../api.rst:2103 -msgid "The predicate to call on every element. Could be a |coroutine_link|_." -msgstr "" - -#: ../../api.rst:2109 -msgid "Audit Log Data" -msgstr "監査ログデータ" - -#: ../../api.rst:2111 -msgid "" -"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." -msgstr "" - -#: discord.AuditLogEntry:1 of -msgid "Represents an Audit Log entry." -msgstr "" - -#: discord.AuditLogEntry:3 of -msgid "You retrieve these via :meth:`Guild.audit_logs`." -msgstr "" - -#: discord.AuditLogEntry:7 of -#, fuzzy -msgid "The action that was done." -msgstr "参加したギルド。" - -#: discord.AuditLogEntry:9 of -#, fuzzy -msgid ":class:`AuditLogAction`" -msgstr ":class:`.Guild`" - -#: discord.AuditLogEntry:13 of -msgid "" -"The user who initiated this action. Usually a :class:`Member`\\, unless " -"gone then it's a :class:`User`." -msgstr "" - -#: discord.AuditLogEntry:16 discord.Message:25 of -#, fuzzy -msgid ":class:`abc.User`" -msgstr ":class:`str`" - -#: discord.AuditLogEntry:20 of -msgid "The entry ID." -msgstr "" - -#: discord.AuditLogEntry:26 of -msgid "" -"The target that got changed. The exact type of this depends on the action" -" being done." -msgstr "" - -#: discord.AuditLogEntry:29 discord.AuditLogEntry:44 of -msgid "Any" -msgstr "" - -#: discord.AuditLogEntry:33 of -msgid "The reason this action was done." -msgstr "" - -#: discord.AuditLogEntry:39 of -msgid "" -"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." -msgstr "" - -#: discord.AuditLogEntry.created_at:1 of -#, fuzzy -msgid "Returns the entry's creation time in UTC." -msgstr "カテゴリの名前を返します。" - -#: discord.AuditLogEntry.category:1 of -#, fuzzy -msgid "The category of the action, if applicable." -msgstr "該当すれば :class:`Relationship` が返ります。" - -#: discord.AuditLogEntry.category:3 of -msgid "Optional[:class:`AuditLogActionCategory`]" -msgstr "" - -#: discord.AuditLogEntry.changes:1 of -msgid "The list of changes this entry has." -msgstr "" - -#: discord.AuditLogEntry.changes:3 of -#, fuzzy -msgid ":class:`AuditLogChanges`" -msgstr ":class:`bytes`" - -#: discord.AuditLogEntry.before:1 of -msgid "The target's prior state." -msgstr "" - -#: discord.AuditLogEntry.after:3 discord.AuditLogEntry.before:3 of -#, fuzzy -msgid ":class:`AuditLogDiff`" -msgstr ":class:`.Guild`" - -#: discord.AuditLogEntry.after:1 of -msgid "The target's subsequent state." -msgstr "" - -#: ../../api.rst:2120 -msgid "An audit log change set." -msgstr "" - -#: ../../api.rst:2124 -msgid "The old value. The attribute has the type of :class:`AuditLogDiff`." -msgstr "" - -#: ../../api.rst:2126 ../../api.rst:2146 -msgid "" -"Depending on the :class:`AuditLogActionCategory` retrieved by " -":attr:`~AuditLogEntry.category`\\, the data retrieved by this attribute " -"differs:" -msgstr "" - -#: ../../api.rst:2131 ../../api.rst:2151 -msgid "Category" -msgstr "" - -#: ../../api.rst:2131 ../../api.rst:2151 -msgid "Description" -msgstr "" - -#: ../../api.rst:2133 ../../api.rst:2153 -msgid ":attr:`~AuditLogActionCategory.create`" -msgstr ":attr:`~AuditLogActionCategory.create`" - -#: ../../api.rst:2133 -msgid "All attributes are set to ``None``." -msgstr "" - -#: ../../api.rst:2135 ../../api.rst:2155 -msgid ":attr:`~AuditLogActionCategory.delete`" -msgstr ":attr:`~AuditLogActionCategory.delete`" - -#: ../../api.rst:2135 -msgid "All attributes are set the value before deletion." -msgstr "" - -#: ../../api.rst:2137 ../../api.rst:2157 -msgid ":attr:`~AuditLogActionCategory.update`" -msgstr ":attr:`~AuditLogActionCategory.update`" - -#: ../../api.rst:2137 -msgid "All attributes are set the value before updating." -msgstr "" - -#: ../../api.rst:2139 ../../api.rst:2159 -msgid "``None``" -msgstr "``None``" - -#: ../../api.rst:2139 ../../api.rst:2159 -msgid "No attributes are set." -msgstr "" - -#: ../../api.rst:2144 -msgid "The new value. The attribute has the type of :class:`AuditLogDiff`." -msgstr "" - -#: ../../api.rst:2153 -msgid "All attributes are set to the created value" -msgstr "" - -#: ../../api.rst:2155 -msgid "All attributes are set to ``None``" -msgstr "" - -#: ../../api.rst:2157 -msgid "All attributes are set the value after updating." -msgstr "" - -#: ../../api.rst:2164 -msgid "" -"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." -msgstr "" - -#: ../../api.rst:2168 -msgid "" -"Note that accessing an attribute that does not match the specified action" -" will lead to an attribute error." -msgstr "" - -#: ../../api.rst:2171 -msgid "" -"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." -msgstr "" - -#: ../../api.rst:2180 -msgid "Returns an iterator over (attribute, value) tuple of this diff." -msgstr "" - -#: ../../api.rst:2184 -#, fuzzy -msgid "A name of something." -msgstr "ギルドの名前。" - -#: ../../api.rst:2190 -msgid "A guild's icon hash. See also :attr:`Guild.icon`." -msgstr "" - -#: ../../api.rst:2196 -msgid "The guild's invite splash hash. See also :attr:`Guild.splash`." -msgstr "" - -#: ../../api.rst:2202 -msgid "The guild's owner. See also :attr:`Guild.owner`" -msgstr "" - -#: ../../api.rst:2204 -msgid "Union[:class:`Member`, :class:`User`]" -msgstr "" - -#: ../../api.rst:2208 -msgid "The guild's voice region. See also :attr:`Guild.region`." -msgstr "" - -#: ../../api.rst:2210 discord.GroupCall:27 discord.Guild:40 of -#, fuzzy -msgid ":class:`VoiceRegion`" -msgstr ":class:`bool`" - -#: ../../api.rst:2214 -#, fuzzy -msgid "The guild's AFK channel." -msgstr "ギルドのニュースチャンネル。" - -#: ../../api.rst:2216 ../../api.rst:2227 -msgid "" -"If this could not be found, then it falls back to a :class:`Object` with " -"the ID being set." -msgstr "" - -#: ../../api.rst:2219 -msgid "See :attr:`Guild.afk_channel`." -msgstr "" - -#: ../../api.rst:2221 -#, fuzzy -msgid "Union[:class:`VoiceChannel`, :class:`Object`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: ../../api.rst:2225 -#, fuzzy -msgid "The guild's system channel." -msgstr "ギルドのストアチャンネル。" - -#: ../../api.rst:2230 -msgid "See :attr:`Guild.system_channel`." -msgstr "" - -#: ../../api.rst:2232 ../../api.rst:2259 -#, fuzzy -msgid "Union[:class:`TextChannel`, :class:`Object`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: ../../api.rst:2236 -msgid "The guild's AFK timeout. See :attr:`Guild.afk_timeout`." -msgstr "" - -#: ../../api.rst:2242 -msgid "The guild's MFA level. See :attr:`Guild.mfa_level`." -msgstr "" - -#: ../../api.rst:2248 -msgid "The guild's widget has been enabled or disabled." -msgstr "" - -#: ../../api.rst:2254 -#, fuzzy -msgid "The widget's channel." -msgstr "ボイスチャンネル。" - -#: ../../api.rst:2256 -msgid "" -"If this could not be found then it falls back to a :class:`Object` with " -"the ID being set." -msgstr "" - -#: ../../api.rst:2263 discord.Guild:128 of -#, fuzzy -msgid "The guild's verification level." -msgstr "認証レベルが等しいか確認します。" - -#: ../../api.rst:2265 -msgid "See also :attr:`Guild.verification_level`." -msgstr "" - -#: ../../api.rst:2267 discord.Guild:130 discord.PartialInviteGuild:40 of -#, fuzzy -msgid ":class:`VerificationLevel`" -msgstr ":class:`.Profile`" - -#: ../../api.rst:2271 -msgid "The guild's default notification level." -msgstr "" - -#: ../../api.rst:2273 -msgid "See also :attr:`Guild.default_notifications`." -msgstr "" - -#: ../../api.rst:2275 discord.Guild:142 of -#, fuzzy -msgid ":class:`NotificationLevel`" -msgstr ":class:`.Profile`" - -#: ../../api.rst:2279 -#, fuzzy -msgid "The guild's content filter." -msgstr "ギルドで表現のフィルターが有効ではない。" - -#: ../../api.rst:2281 -msgid "See also :attr:`Guild.explicit_content_filter`." -msgstr "" - -#: ../../api.rst:2283 discord.Guild:136 of -#, fuzzy -msgid ":class:`ContentFilter`" -msgstr ":class:`.Profile`" - -#: ../../api.rst:2287 -#, fuzzy -msgid "The guild's default message notification setting." -msgstr ":attr:`~AuditLogDiff.default_message_notifications`" - -#: ../../api.rst:2293 -#, fuzzy -msgid "The guild's vanity URL." -msgstr "ギルドのウィジェット。" - -#: ../../api.rst:2295 -msgid "See also :meth:`Guild.vanity_invite` and :meth:`Guild.edit`." -msgstr "" - -#: ../../api.rst:2301 -msgid "The position of a :class:`Role` or :class:`abc.GuildChannel`." -msgstr "" - -#: ../../api.rst:2307 -#, fuzzy -msgid "The type of channel or channel permission overwrite." -msgstr "権限を確認したいチャンネル。" - -#: ../../api.rst:2309 -msgid "" -"If the type is an :class:`int`, then it is a type of channel which can be" -" either ``0`` to indicate a text channel or ``1`` to indicate a voice " -"channel." -msgstr "" - -#: ../../api.rst:2312 -msgid "" -"If the type is a :class:`str`, then it is a type of permission overwrite " -"which can be either ``'role'`` or ``'member'``." -msgstr "" - -#: ../../api.rst:2315 -#, fuzzy -msgid "Union[:class:`int`, :class:`str`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: ../../api.rst:2319 -#, fuzzy -msgid "The topic of a :class:`TextChannel`." -msgstr ":class:`str` – :class:`TextChannel` のトピック。" - -#: ../../api.rst:2321 -msgid "See also :attr:`TextChannel.topic`." -msgstr "" - -#: ../../api.rst:2327 -#, fuzzy -msgid "The bitrate of a :class:`VoiceChannel`." -msgstr ":class:`str` – :class:`TextChannel` のトピック。" - -#: ../../api.rst:2329 -msgid "See also :attr:`VoiceChannel.bitrate`." -msgstr "" - -#: ../../api.rst:2335 -msgid "" -"A list of permission overwrite tuples that represents a target and a " -":class:`PermissionOverwrite` for said target." -msgstr "" - -#: ../../api.rst:2338 -msgid "" -"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." -msgstr "" - -#: ../../api.rst:2344 -msgid "List[Tuple[target, :class:`PermissionOverwrite`]]" -msgstr "" - -#: ../../api.rst:2348 -msgid "A list of roles being added or removed from a member." -msgstr "" - -#: ../../api.rst:2350 -msgid "" -"If a role is not found then it is a :class:`Object` with the ID and name " -"being filled in." -msgstr "" - -#: ../../api.rst:2353 -msgid "List[Union[:class:`Role`, :class:`Object`]]" -msgstr "" - -#: ../../api.rst:2357 -msgid "The nickname of a member." -msgstr "" - -#: ../../api.rst:2359 -msgid "See also :attr:`Member.nick`" -msgstr "" - -#: ../../api.rst:2365 -msgid "Whether the member is being server deafened." -msgstr "" - -#: ../../api.rst:2367 -msgid "See also :attr:`VoiceState.deaf`." -msgstr "" - -#: ../../api.rst:2373 -msgid "Whether the member is being server muted." -msgstr "" - -#: ../../api.rst:2375 -msgid "See also :attr:`VoiceState.mute`." -msgstr "" - -#: ../../api.rst:2381 -#, fuzzy -msgid "The permissions of a role." -msgstr ":class:`Permissions` – 役職の権限。" - -#: ../../api.rst:2383 -msgid "See also :attr:`Role.permissions`." -msgstr "" - -#: ../../api.rst:2385 ../../api.rst:2474 discord.DMChannel.permissions_for:17 -#: discord.GroupChannel.permissions_for:18 discord.Member.guild_permissions:12 -#: discord.Member.permissions_in:13 discord.Role.permissions:3 of -msgid ":class:`Permissions`" -msgstr "" - -#: ../../api.rst:2390 -#, fuzzy -msgid "The colour of a role." -msgstr ":class:`Colour` – 役職の色。" - -#: ../../api.rst:2392 -msgid "See also :attr:`Role.colour`" -msgstr "" - -#: ../../api.rst:2394 discord.ClientUser.color:6 discord.ClientUser.colour:6 -#: discord.Member.color:7 discord.Member.colour:7 discord.Role.color:3 -#: discord.Role.colour:3 discord.Spotify.color:5 discord.Spotify.colour:5 -#: discord.User.color:6 discord.User.colour:6 discord.WidgetMember.color:6 -#: discord.WidgetMember.colour:6 of -#, fuzzy -msgid ":class:`Colour`" -msgstr ":class:`bool`" - -#: ../../api.rst:2398 -msgid "Whether the role is being hoisted or not." -msgstr "" - -#: ../../api.rst:2400 -msgid "See also :attr:`Role.hoist`" -msgstr "" - -#: ../../api.rst:2406 -msgid "Whether the role is mentionable or not." -msgstr "" - -#: ../../api.rst:2408 -msgid "See also :attr:`Role.mentionable`" -msgstr "" - -#: ../../api.rst:2414 -#, fuzzy -msgid "The invite's code." -msgstr "招待コード。" - -#: ../../api.rst:2416 -msgid "See also :attr:`Invite.code`" -msgstr "" - -#: ../../api.rst:2422 -#, fuzzy -msgid "A guild channel." -msgstr "ギルドのニュースチャンネル。" - -#: ../../api.rst:2424 -msgid "" -"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." -msgstr "" - -#: ../../api.rst:2427 -#, fuzzy -msgid "Union[:class:`abc.GuildChannel`, :class:`Object`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: ../../api.rst:2431 discord.Invite:97 of -#, fuzzy -msgid "The user who created the invite." -msgstr ":class:`User` – 招待を作成したユーザー。" - -#: ../../api.rst:2433 -msgid "See also :attr:`Invite.inviter`." -msgstr "" - -#: ../../api.rst:2439 -#, fuzzy -msgid "The invite's max uses." -msgstr ":class:`int` – 招待の最大使用可能回数。" - -#: ../../api.rst:2441 -msgid "See also :attr:`Invite.max_uses`." -msgstr "" - -#: ../../api.rst:2447 -#, fuzzy -msgid "The invite's current uses." -msgstr ":class:`int` – 招待の現在までの使用回数。" - -#: ../../api.rst:2449 -msgid "See also :attr:`Invite.uses`." -msgstr "" - -#: ../../api.rst:2455 -#, fuzzy -msgid "The invite's max age in seconds." -msgstr ":class:`int` – 招待の最大使用可能回数。" - -#: ../../api.rst:2457 -msgid "See also :attr:`Invite.max_age`." -msgstr "" - -#: ../../api.rst:2463 -msgid "If the invite is a temporary invite." -msgstr "" - -#: ../../api.rst:2465 -msgid "See also :attr:`Invite.temporary`." -msgstr "" - -#: ../../api.rst:2472 -msgid "The permissions being allowed or denied." -msgstr "" - -#: ../../api.rst:2478 -#, fuzzy -msgid "The ID of the object being changed." -msgstr "更新される前のギルド。" - -#: ../../api.rst:2484 -msgid "The avatar hash of a member." -msgstr "" - -#: ../../api.rst:2486 -msgid "See also :attr:`User.avatar`." -msgstr "" - -#: ../../api.rst:2492 -msgid "" -"The number of seconds members have to wait before sending another message" -" in the channel." -msgstr "" - -#: ../../api.rst:2495 -msgid "See also :attr:`TextChannel.slowmode_delay`." -msgstr "" - -#: ../../api.rst:2503 -msgid "Webhook Support" -msgstr "Webhookサポート" - -#: ../../api.rst:2505 -msgid "" -"discord.py offers support for creating, editing, and executing webhooks " -"through the :class:`Webhook` class." -msgstr "" - -#: discord.Webhook:1 of -msgid "Represents a Discord webhook." -msgstr "" - -#: discord.Webhook:3 of -msgid "" -"Webhooks are a form to send messages to channels in Discord without a bot" -" user or authentication." -msgstr "" - -#: discord.Webhook:6 of -msgid "" -"There are two main ways to use Webhooks. The first is through the ones " -"received by the library such as :meth:`.Guild.webhooks` and " -":meth:`.TextChannel.webhooks`. The ones received by the library will " -"automatically have an adapter bound using the library's HTTP session. " -"Those webhooks will have :meth:`~.Webhook.send`, :meth:`~.Webhook.delete`" -" and :meth:`~.Webhook.edit` as coroutines." -msgstr "" - -#: discord.Webhook:13 of -msgid "" -"The second form involves creating a webhook object manually without " -"having it bound to a websocket connection using the " -":meth:`~.Webhook.from_url` or :meth:`~.Webhook.partial` classmethods. " -"This form allows finer grained control over how requests are done, " -"allowing you to mix async and sync code using either :doc:`aiohttp " -"` or :doc:`req:index`." -msgstr "" - -#: discord.Webhook:19 of -msgid "" -"For example, creating a webhook from a URL and using :doc:`aiohttp " -"`:" -msgstr "" - -#: discord.Webhook:31 of -msgid "Or creating a webhook from an ID and token and using :doc:`req:index`:" -msgstr "" - -#: discord.Webhook:45 of -#, fuzzy -msgid "Checks if two webhooks are equal." -msgstr "二つのユーザーが等しいかを比較します。" - -#: discord.Webhook:49 of -#, fuzzy -msgid "Checks if two webhooks are not equal." -msgstr "二つのユーザーが等しいものではないか比較します。" - -#: discord.Webhook:53 of -#, fuzzy -msgid "Returns the webhooks's hash." -msgstr "カテゴリのハッシュを返します。" - -#: discord.Webhook:55 of -msgid "Webhooks are now comparable and hashable." -msgstr "" - -#: discord.Webhook:60 of -msgid "The webhook's ID" -msgstr "" - -#: discord.Webhook:66 of -#, fuzzy -msgid "The type of the webhook." -msgstr "ユーザーのプロフィール。" - -#: discord.Webhook:70 of -#, fuzzy -msgid ":class:`WebhookType`" -msgstr ":class:`.Webhook`" - -#: discord.Webhook:74 of -msgid "" -"The authentication token of the webhook. If this is ``None`` then the " -"webhook cannot be used to make requests." -msgstr "" - -#: discord.Webhook:81 of -msgid "The guild ID this webhook is for." -msgstr "" - -#: discord.Webhook:87 of -#, fuzzy -msgid "The channel ID this webhook is for." -msgstr "Webhookが更新されたチャンネル。" - -#: discord.Webhook:93 of -msgid "" -"The user this webhook was created by. If the webhook was received without" -" authentication then this will be ``None``." -msgstr "" - -#: discord.Webhook:96 of -msgid "Optional[:class:`abc.User`]" -msgstr "" - -#: discord.Webhook:100 of -#, fuzzy -msgid "The default name of the webhook." -msgstr "フィールドの名前。" - -#: discord.Webhook:106 of -msgid "The default avatar of the webhook." -msgstr "" - -#: discord.Webhook.url:1 of -msgid "Returns the webhook's url." -msgstr "" - -#: discord.Webhook.partial:1 of -msgid "Creates a partial :class:`Webhook`." -msgstr "" - -#: discord.Webhook.partial:3 of -msgid "The ID of the webhook." -msgstr "" - -#: discord.Webhook.partial:5 of -msgid "The authentication token of the webhook." -msgstr "" - -#: discord.Webhook.from_url:5 discord.Webhook.partial:7 of -msgid "" -"The webhook adapter to use when sending requests. This is typically " -":class:`AsyncWebhookAdapter` for :doc:`aiohttp ` or " -":class:`RequestsWebhookAdapter` for :doc:`req:index`." -msgstr "" - -#: discord.Webhook.from_url:12 discord.Webhook.partial:12 of -msgid "" -"A partial :class:`Webhook`. A partial webhook is just a webhook object " -"with an ID and a token." -msgstr "" - -#: discord.TextChannel.create_webhook:22 discord.TextChannel.follow:23 -#: discord.Webhook.from_url:14 discord.Webhook.partial:14 -#: discord.WebhookAdapter:7 of -msgid ":class:`Webhook`" -msgstr "" - -#: discord.Webhook.from_url:1 of -msgid "Creates a partial :class:`Webhook` from a webhook URL." -msgstr "" - -#: discord.Webhook.from_url:3 of -msgid "The URL of the webhook." -msgstr "" - -#: discord.Webhook.from_url:10 of -#, fuzzy -msgid "The URL is invalid." -msgstr "メンバーがオンライン。" - -#: discord.Webhook.guild:1 of -msgid "The guild this webhook belongs to." -msgstr "" - -#: discord.Webhook.channel:3 discord.Webhook.guild:3 of -msgid "If this is a partial webhook, then this will always return ``None``." -msgstr "" - -#: discord.Webhook.channel:1 of -#, fuzzy -msgid "The text channel this webhook belongs to." -msgstr "Webhookが更新されたチャンネル。" - -#: discord.Guild.public_updates_channel:9 discord.Guild.rules_channel:8 -#: discord.Guild.system_channel:5 discord.Webhook.channel:5 of -msgid "Optional[:class:`TextChannel`]" -msgstr "" - -#: discord.Webhook.created_at:1 of -msgid "Returns the webhook's creation time in UTC." -msgstr "" - -#: discord.Webhook.avatar_url:1 discord.Webhook.avatar_url_as:1 of -msgid "Returns an :class:`Asset` for the avatar the webhook has." -msgstr "" - -#: discord.Webhook.avatar_url:3 discord.Webhook.avatar_url_as:3 of -msgid "" -"If the webhook does not have a traditional avatar, an asset for the " -"default avatar is returned instead." -msgstr "" - -#: discord.Webhook.avatar_url:6 of -msgid "" -"This is equivalent to calling :meth:`avatar_url_as` with the default " -"parameters." -msgstr "" - -#: discord.ClientUser.avatar_url:9 discord.ClientUser.avatar_url_as:24 -#: discord.ClientUser.default_avatar_url:3 discord.Emoji.url:3 -#: discord.GroupChannel.icon_url:3 discord.Guild.banner_url:3 -#: discord.Guild.banner_url_as:14 discord.Guild.discovery_splash_url:5 -#: discord.Guild.discovery_splash_url_as:16 discord.Guild.icon_url:3 -#: discord.Guild.icon_url_as:20 discord.Guild.splash_url:3 -#: discord.Guild.splash_url_as:14 discord.Member.avatar_url_as:24 -#: discord.PartialEmoji.url:3 discord.PartialInviteGuild.banner_url:3 -#: discord.PartialInviteGuild.banner_url_as:4 -#: discord.PartialInviteGuild.icon_url:3 -#: discord.PartialInviteGuild.icon_url_as:4 -#: discord.PartialInviteGuild.splash_url:3 -#: discord.PartialInviteGuild.splash_url_as:4 discord.User.avatar_url:9 -#: discord.User.avatar_url_as:24 discord.User.default_avatar_url:3 -#: discord.Webhook.avatar_url:9 discord.Webhook.avatar_url_as:18 -#: discord.WidgetMember.avatar_url:9 discord.WidgetMember.avatar_url_as:24 -#: discord.WidgetMember.default_avatar_url:3 of -msgid ":class:`Asset`" -msgstr "" - -#: discord.Webhook.avatar_url_as:6 of -msgid "" -"The format must be one of 'jpeg', 'jpg', or 'png'. The size must be a " -"power of 2 between 16 and 1024." -msgstr "" - -#: discord.Webhook.avatar_url_as:9 of -msgid "" -"The format to attempt to convert the avatar to. If the format is " -"``None``, then it is equivalent to png." -msgstr "" - -#: discord.ClientUser.avatar_url_as:18 discord.Guild.banner_url_as:8 -#: discord.Guild.discovery_splash_url_as:10 discord.Guild.icon_url_as:14 -#: discord.Guild.splash_url_as:8 discord.Member.avatar_url_as:18 -#: discord.User.avatar_url_as:18 discord.Webhook.avatar_url_as:12 -#: discord.WidgetMember.avatar_url_as:18 of -msgid "The size of the image to display." -msgstr "" - -#: discord.Guild.banner_url_as:11 discord.Guild.discovery_splash_url_as:13 -#: discord.Guild.icon_url_as:17 discord.Guild.splash_url_as:11 -#: discord.Webhook.avatar_url_as:15 of -msgid "Bad image format passed to ``format`` or invalid ``size``." -msgstr "" - -#: discord.ClientUser.avatar_url_as:23 discord.Guild.banner_url_as:13 -#: discord.Guild.discovery_splash_url_as:15 discord.Guild.icon_url_as:19 -#: discord.Guild.splash_url_as:13 discord.Member.avatar_url_as:23 -#: discord.PartialInviteGuild.banner_url_as:3 -#: discord.PartialInviteGuild.icon_url_as:3 -#: discord.PartialInviteGuild.splash_url_as:3 discord.User.avatar_url_as:23 -#: discord.Webhook.avatar_url_as:17 discord.WidgetMember.avatar_url_as:23 of -msgid "The resulting CDN asset." -msgstr "" - -#: discord.Webhook.delete:1 discord.Webhook.edit:1 discord.Webhook.send:1 of -msgid "|maybecoro|" -msgstr "" - -#: discord.Webhook.delete:3 of -msgid "Deletes this Webhook." -msgstr "" - -#: discord.Webhook.delete:5 discord.Webhook.edit:5 discord.Webhook.send:5 of -msgid "" -"If the webhook is constructed with a :class:`RequestsWebhookAdapter` then" -" this is not a coroutine." -msgstr "" - -#: discord.Webhook.delete:8 of -msgid "" -"The reason for deleting this webhook. Shows up on the audit log. .. " -"versionadded:: 1.4" -msgstr "" - -#: discord.Webhook.delete:8 of -msgid "The reason for deleting this webhook. Shows up on the audit log." -msgstr "" - -#: discord.Webhook.delete:13 of -#, fuzzy -msgid "Deleting the webhook failed." -msgstr ":exc:`.HTTPException` -- Webhookの取得に失敗した。" - -#: discord.Webhook.delete:14 discord.Webhook.edit:18 of -msgid "This webhook does not exist." -msgstr "" - -#: discord.Webhook.delete:15 of -#, fuzzy -msgid "You do not have permissions to delete this webhook." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Webhook.delete:16 discord.Webhook.edit:19 of -msgid "This webhook does not have a token associated with it." -msgstr "" - -#: discord.Webhook.edit:3 of -msgid "Edits this Webhook." -msgstr "" - -#: discord.Webhook.edit:8 of -msgid "The webhook's new default name." -msgstr "" - -#: discord.Webhook.edit:10 of -msgid "" -"A :term:`py:bytes-like object` representing the webhook's new default " -"avatar." -msgstr "" - -#: discord.Webhook.edit:12 of -msgid "" -"The reason for editing this webhook. Shows up on the audit log. .. " -"versionadded:: 1.4" -msgstr "" - -#: discord.Webhook.edit:12 of -msgid "The reason for editing this webhook. Shows up on the audit log." -msgstr "" - -#: discord.Webhook.edit:17 of -#, fuzzy -msgid "Editing the webhook failed." -msgstr ":exc:`.HTTPException` -- Webhookの取得に失敗した。" - -#: discord.Webhook.send:3 of -msgid "Sends a message using the webhook." -msgstr "" - -#: discord.Webhook.send:8 of -msgid "" -"The content must be a type that can convert to a string through " -"``str(content)``." -msgstr "" - -#: discord.Webhook.send:10 of -msgid "" -"To upload a single file, the ``file`` parameter should be used with a " -"single :class:`File` object." -msgstr "" - -#: discord.Webhook.send:13 of -msgid "" -"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." -msgstr "" - -#: discord.DMChannel.send:17 discord.GroupChannel.send:17 -#: discord.Member.send:17 discord.TextChannel.send:17 discord.User.send:17 -#: discord.Webhook.send:17 discord.abc.Messageable.send:17 of -msgid "The content of the message to send." -msgstr "" - -#: discord.Webhook.send:19 of -msgid "" -"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:`Message` if set to ``True``." -msgstr "" - -#: discord.Webhook.send:23 of -msgid "" -"The username to send with this message. If no username is provided then " -"the default username for the webhook is used." -msgstr "" - -#: discord.Webhook.send:26 of -msgid "" -"The avatar URL to send with this message. If no avatar URL is provided " -"then the default avatar for the webhook is used." -msgstr "" - -#: discord.DMChannel.send:19 discord.GroupChannel.send:19 -#: discord.Member.send:19 discord.TextChannel.send:19 discord.User.send:19 -#: discord.Webhook.send:29 discord.abc.Messageable.send:19 of -msgid "Indicates if the message should be sent using text-to-speech." -msgstr "" - -#: discord.Webhook.send:31 of -msgid "The file to upload. This cannot be mixed with ``files`` parameter." -msgstr "" - -#: discord.Webhook.send:33 of -msgid "" -"A list of files to send with the content. This cannot be mixed with the " -"``file`` parameter." -msgstr "" - -#: discord.Webhook.send:36 of -msgid "" -"The rich embed for the content to send. This cannot be mixed with " -"``embeds`` parameter." -msgstr "" - -#: discord.Webhook.send:39 of -msgid "" -"A list of embeds to send with the content. Maximum of 10. This cannot be " -"mixed with the ``embed`` parameter." -msgstr "" - -#: discord.Message.edit:25 discord.Webhook.send:42 of -msgid "" -"Controls the mentions being processed in this message. .. versionadded::" -" 1.4" -msgstr "" - -#: discord.Message.edit:25 discord.Webhook.send:42 of -msgid "Controls the mentions being processed in this message." -msgstr "" - -#: discord.DMChannel.send:44 discord.GroupChannel.send:44 -#: discord.Member.send:44 discord.TextChannel.send:44 discord.User.send:44 -#: discord.Webhook.send:47 discord.abc.Messageable.send:44 of -msgid "Sending the message failed." -msgstr "" - -#: discord.Webhook.send:48 of -msgid "This webhook was not found." -msgstr "" - -#: discord.Webhook.send:49 of -msgid "The authorization token for the webhook is incorrect." -msgstr "" - -#: discord.Webhook.send:50 of -msgid "" -"You specified both ``embed`` and ``embeds`` or the length of " -"``embeds`` was invalid or there was no token associated with this " -"webhook." -msgstr "" - -#: discord.DMChannel.send:48 discord.GroupChannel.send:48 -#: discord.Member.send:48 discord.TextChannel.send:48 discord.User.send:48 -#: discord.Webhook.send:52 discord.abc.Messageable.send:48 of -msgid "The message that was sent." -msgstr "" - -#: discord.MessageReference.cached_message:3 discord.RawMessageDeleteEvent:25 -#: discord.RawMessageUpdateEvent:27 discord.TextChannel.last_message:14 -#: discord.Webhook.send:53 of -msgid "Optional[:class:`Message`]" -msgstr "" - -#: discord.Webhook.execute:1 of -msgid "An alias for :meth:`~.Webhook.send`." -msgstr "" - -#: ../../api.rst:2511 -msgid "Adapters" -msgstr "" - -#: ../../api.rst:2513 -msgid "" -"Adapters allow you to change how the request should be handled. They all " -"build on a single interface, :meth:`WebhookAdapter.request`." -msgstr "" - -#: discord.WebhookAdapter:1 of -msgid "Base class for all webhook adapters." -msgstr "" - -#: discord.WebhookAdapter:5 of -msgid "The webhook that owns this adapter." -msgstr "" - -#: discord.AsyncWebhookAdapter.request:1 -#: discord.RequestsWebhookAdapter.request:1 discord.WebhookAdapter.request:1 of -msgid "Actually does the request." -msgstr "" - -#: discord.AsyncWebhookAdapter.request:5 -#: discord.RequestsWebhookAdapter.request:5 discord.WebhookAdapter.request:5 of -msgid "The HTTP verb to use for the request." -msgstr "" - -#: discord.AsyncWebhookAdapter.request:7 -#: discord.RequestsWebhookAdapter.request:7 discord.WebhookAdapter.request:7 of -msgid "" -"The URL to send the request to. This will have the query parameters " -"already added to it, if any." -msgstr "" - -#: discord.AsyncWebhookAdapter.request:10 -#: discord.RequestsWebhookAdapter.request:10 discord.WebhookAdapter.request:10 -#: of -msgid "" -"A dict containing multipart form data to send with the request. If a " -"filename is being uploaded, then it will be under a ``file`` key which " -"will have a 3-element :class:`tuple` denoting ``(filename, file, " -"content_type)``." -msgstr "" - -#: discord.AsyncWebhookAdapter.request:15 -#: discord.RequestsWebhookAdapter.request:15 discord.WebhookAdapter.request:15 -#: of -msgid "The JSON to send with the request, if any." -msgstr "" - -#: discord.AsyncWebhookAdapter.handle_execution_response:1 -#: discord.RequestsWebhookAdapter.handle_execution_response:1 -#: discord.WebhookAdapter.handle_execution_response:1 of -msgid "Transforms the webhook execution response into something more meaningful." -msgstr "" - -#: discord.AsyncWebhookAdapter.handle_execution_response:4 -#: discord.RequestsWebhookAdapter.handle_execution_response:4 -#: discord.WebhookAdapter.handle_execution_response:4 of -msgid "" -"This is mainly used to convert the data into a :class:`Message` if " -"necessary." -msgstr "" - -#: discord.AsyncWebhookAdapter.handle_execution_response:9 -#: discord.RequestsWebhookAdapter.handle_execution_response:9 -#: discord.WebhookAdapter.handle_execution_response:9 of -msgid "The data that was returned from the request." -msgstr "" - -#: discord.AsyncWebhookAdapter.handle_execution_response:10 -#: discord.RequestsWebhookAdapter.handle_execution_response:10 -#: discord.WebhookAdapter.handle_execution_response:10 of -msgid "Whether the webhook execution was asked to wait or not." -msgstr "" - -#: discord.AsyncWebhookAdapter:1 of -msgid "A webhook adapter suited for use with aiohttp." -msgstr "" - -#: discord.AsyncWebhookAdapter:5 of -msgid "You are responsible for cleaning up the client session." -msgstr "" - -#: discord.AsyncWebhookAdapter:7 of -msgid "The session to use to send requests." -msgstr "" - -#: discord.RequestsWebhookAdapter:1 of -msgid "A webhook adapter suited for use with ``requests``." -msgstr "" - -#: discord.RequestsWebhookAdapter:3 of -msgid "Only versions of :doc:`req:index` higher than 2.13.0 are supported." -msgstr "" - -#: discord.RequestsWebhookAdapter:5 of -msgid "" -"The requests session to use for sending requests. If not given then each " -"request will create a new session. Note if a session is given, the " -"webhook adapter **will not** clean it up for you. You must close the " -"session yourself." -msgstr "" - -#: discord.RequestsWebhookAdapter:10 of -msgid "" -"Whether to sleep the thread when encountering a 429 or pre-emptive rate " -"limit or a 5xx status code. Defaults to ``True``. If set to ``False`` " -"then this will raise an :exc:`HTTPException` instead." -msgstr "" - -#: ../../api.rst:2528 -msgid "Abstract Base Classes" -msgstr "抽象基底クラス" - -#: ../../api.rst:2530 -msgid "" -"An :term:`py:abstract base class` (also known as an ``abc``) is a class " -"that models can inherit to get their behaviour. The Python implementation" -" of an :doc:`abc ` is slightly different in that you can " -"register them at run-time. **Abstract base classes cannot be " -"instantiated**. They are mainly there for usage with " -":func:`py:isinstance` and :func:`py:issubclass`\\." -msgstr "" - -#: ../../api.rst:2535 -msgid "" -"This library has a module related to abstract base classes, some of which" -" are actually from the :doc:`abc ` standard module, " -"others which are not." -msgstr "" - -#: discord.abc.Snowflake:1 of -msgid "An ABC that details the common operations on a Discord model." -msgstr "" - -#: discord.abc.Snowflake:3 of -msgid "" -"Almost all :ref:`Discord models ` meet this abstract " -"base class." -msgstr "" - -#: discord.abc.Snowflake:6 of -msgid "" -"If you want to create a snowflake on your own, consider using " -":class:`.Object`." -msgstr "" - -#: discord.abc.Snowflake:11 of -msgid "The model's unique ID." -msgstr "" - -#: discord.abc.Snowflake.created_at:1 of -#, fuzzy -msgid "Returns the model's creation time as a naive datetime in UTC." -msgstr "UTCのnaive datetimeでの、タイピングの開始時刻。" - -#: discord.abc.User:1 of -msgid "An ABC that details the common operations on a Discord user." -msgstr "" - -#: discord.abc.Connectable:4 discord.abc.GuildChannel:3 -#: discord.abc.Messageable:3 discord.abc.PrivateChannel:3 discord.abc.User:3 of -msgid "The following implement this ABC:" -msgstr "" - -#: discord.abc.PrivateChannel:14 discord.abc.User:6 of -msgid ":class:`~discord.ClientUser`" -msgstr ":class:`~discord.ClientUser`" - -#: discord.abc.Messageable:9 discord.abc.User:7 of -msgid ":class:`~discord.Member`" -msgstr "" - -#: discord.abc.GuildChannel:9 discord.abc.PrivateChannel:8 discord.abc.User:9 -#: of -msgid "This ABC must also implement :class:`~discord.abc.Snowflake`." -msgstr "" - -#: discord.ClientUser:23 discord.User:23 discord.abc.User:13 of -#, fuzzy -msgid "The user's username." -msgstr ":class:`str` -- ユーザーのユーザー名。" - -#: discord.abc.User:19 of -#, fuzzy -msgid "The user's discriminator." -msgstr "ユーザー名とディスクリミネータを返します。" - -#: discord.abc.User:25 of -#, fuzzy -msgid "The avatar hash the user has." -msgstr "ユーザーのハッシュ値を返します。" - -#: discord.abc.User:31 of -#, fuzzy -msgid "If the user is a bot account." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.ClientUser.display_name:1 discord.Member.display_name:1 -#: discord.User.display_name:1 discord.abc.User.display_name:1 of -#, fuzzy -msgid "Returns the user's display name." -msgstr "役職の名前を返します。" - -#: discord.ClientUser.mention:1 discord.User.mention:1 -#: discord.WidgetMember.mention:1 discord.abc.User.mention:1 of -msgid "Returns a string that allows you to mention the given user." -msgstr "" - -#: discord.abc.PrivateChannel:1 of -msgid "An ABC that details the common operations on a private Discord channel." -msgstr "" - -#: discord.abc.Messageable:6 discord.abc.PrivateChannel:5 of -msgid ":class:`~discord.DMChannel`" -msgstr "" - -#: discord.abc.Messageable:7 discord.abc.PrivateChannel:6 of -msgid ":class:`~discord.GroupChannel`" -msgstr "" - -#: discord.DMChannel:29 discord.GroupChannel:29 discord.abc.PrivateChannel:12 -#: of -#, fuzzy -msgid "The user presenting yourself." -msgstr ":class:`~discord.ClientUser` -- ユーザー自分自身。" - -#: discord.abc.GuildChannel:1 of -msgid "An ABC that details the common operations on a Discord guild channel." -msgstr "" - -#: discord.abc.GuildChannel:5 discord.abc.Messageable:5 of -msgid ":class:`~discord.TextChannel`" -msgstr "" - -#: discord.abc.Connectable:6 discord.abc.GuildChannel:6 of -msgid ":class:`~discord.VoiceChannel`" -msgstr "" - -#: discord.abc.GuildChannel:7 of -msgid ":class:`~discord.CategoryChannel`" -msgstr "" - -#: discord.TextChannel:23 discord.VoiceChannel:23 discord.abc.GuildChannel:13 -#: of -#, fuzzy -msgid "The channel name." -msgstr "テキストチャンネル。" - -#: discord.TextChannel:29 discord.VoiceChannel:29 discord.abc.GuildChannel:19 -#: of -#, fuzzy -msgid "The guild the channel belongs to." -msgstr "ギルドのストアチャンネル。" - -#: discord.abc.GuildChannel:21 of -#, fuzzy -msgid ":class:`~discord.Guild`" -msgstr ":class:`~discord.User`" - -#: discord.Guild.create_text_channel:47 discord.TextChannel:53 -#: discord.VoiceChannel:47 discord.abc.GuildChannel:25 of -msgid "" -"The position in the channel list. This is a number that starts at 0. e.g." -" the top channel is position 0." -msgstr "" - -#: discord.CategoryChannel.changed_roles:1 discord.TextChannel.changed_roles:1 -#: discord.VoiceChannel.changed_roles:1 -#: discord.abc.GuildChannel.changed_roles:1 of -msgid "" -"Returns a list of roles that have been overridden from their default " -"values in the :attr:`~discord.Guild.roles` attribute." -msgstr "" - -#: discord.CategoryChannel.changed_roles:4 discord.TextChannel.changed_roles:4 -#: discord.VoiceChannel.changed_roles:4 -#: discord.abc.GuildChannel.changed_roles:4 of -#, fuzzy -msgid "List[:class:`~discord.Role`]" -msgstr ":class:`~discord.User`" - -#: discord.CategoryChannel.mention:1 discord.PartialInviteChannel.mention:1 -#: discord.TextChannel.mention:1 discord.VoiceChannel.mention:1 -#: discord.WidgetChannel.mention:1 discord.abc.GuildChannel.mention:1 of -msgid "The string that allows you to mention the channel." -msgstr "" - -#: discord.CategoryChannel.created_at:1 discord.GroupChannel.created_at:1 -#: discord.PartialInviteChannel.created_at:1 discord.TextChannel.created_at:1 -#: discord.VoiceChannel.created_at:1 discord.WidgetChannel.created_at:1 -#: discord.abc.GuildChannel.created_at:1 of -msgid "Returns the channel's creation time in UTC." -msgstr "" - -#: discord.CategoryChannel.overwrites_for:1 -#: discord.TextChannel.overwrites_for:1 discord.VoiceChannel.overwrites_for:1 -#: discord.abc.GuildChannel.overwrites_for:1 of -msgid "Returns the channel-specific overwrites for a member or a role." -msgstr "" - -#: discord.CategoryChannel.overwrites_for:3 -#: discord.TextChannel.overwrites_for:3 discord.VoiceChannel.overwrites_for:3 -#: discord.abc.GuildChannel.overwrites_for:3 of -msgid "The role or user denoting whose overwrite to get." -msgstr "" - -#: discord.CategoryChannel.overwrites_for:7 -#: discord.TextChannel.overwrites_for:7 discord.VoiceChannel.overwrites_for:7 -#: discord.abc.GuildChannel.overwrites_for:7 of -msgid "The permission overwrites for this object." -msgstr "" - -#: discord.CategoryChannel.overwrites_for:8 -#: discord.TextChannel.overwrites_for:8 discord.VoiceChannel.overwrites_for:8 -#: discord.abc.GuildChannel.overwrites_for:8 of -msgid ":class:`~discord.PermissionOverwrite`" -msgstr "" - -#: discord.CategoryChannel.overwrites:1 discord.TextChannel.overwrites:1 -#: discord.VoiceChannel.overwrites:1 discord.abc.GuildChannel.overwrites:1 of -msgid "Returns all of the channel's overwrites." -msgstr "" - -#: discord.CategoryChannel.overwrites:3 discord.TextChannel.overwrites:3 -#: discord.VoiceChannel.overwrites:3 discord.abc.GuildChannel.overwrites:3 of -msgid "" -"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`." -msgstr "" - -#: discord.CategoryChannel.overwrites:7 discord.TextChannel.overwrites:7 -#: discord.VoiceChannel.overwrites:7 discord.abc.GuildChannel.overwrites:7 of -msgid "The channel's permission overwrites." -msgstr "" - -#: discord.CategoryChannel.overwrites:8 discord.TextChannel.overwrites:8 -#: discord.VoiceChannel.overwrites:8 discord.abc.GuildChannel.overwrites:8 of -msgid "" -"Mapping[Union[:class:`~discord.Role`, :class:`~discord.Member`], " -":class:`~discord.PermissionOverwrite`]" -msgstr "" - -#: discord.CategoryChannel.category:1 discord.TextChannel.category:1 -#: discord.VoiceChannel.category:1 discord.abc.GuildChannel.category:1 of -msgid "The category this channel belongs to." -msgstr "" - -#: discord.CategoryChannel.category:3 discord.TextChannel.category:3 -#: discord.VoiceChannel.category:3 discord.abc.GuildChannel.category:3 of -msgid "If there is no category then this is ``None``." -msgstr "" - -#: discord.CategoryChannel.category:5 discord.TextChannel.category:5 -#: discord.VoiceChannel.category:5 discord.abc.GuildChannel.category:5 of -#, fuzzy -msgid "Optional[:class:`~discord.CategoryChannel`]" -msgstr ":class:`~discord.User`" - -#: discord.CategoryChannel.permissions_synced:1 -#: discord.TextChannel.permissions_synced:1 -#: discord.VoiceChannel.permissions_synced:1 -#: discord.abc.GuildChannel.permissions_synced:1 of -msgid "" -"Whether or not the permissions for this channel are synced with the " -"category it belongs to." -msgstr "" - -#: discord.CategoryChannel.permissions_synced:4 -#: discord.TextChannel.permissions_synced:4 -#: discord.VoiceChannel.permissions_synced:4 -#: discord.abc.GuildChannel.permissions_synced:4 of -msgid "If there is no category then this is ``False``." -msgstr "" - -#: discord.CategoryChannel.permissions_for:1 -#: discord.TextChannel.permissions_for:1 discord.VoiceChannel.permissions_for:1 -#: discord.abc.GuildChannel.permissions_for:1 of -msgid "Handles permission resolution for the current :class:`~discord.Member`." -msgstr "" - -#: discord.CategoryChannel.permissions_for:3 -#: discord.TextChannel.permissions_for:3 discord.VoiceChannel.permissions_for:3 -#: discord.abc.GuildChannel.permissions_for:3 of -msgid "This function takes into consideration the following cases:" -msgstr "" - -#: discord.CategoryChannel.permissions_for:5 -#: discord.TextChannel.permissions_for:5 discord.VoiceChannel.permissions_for:5 -#: discord.abc.GuildChannel.permissions_for:5 of -msgid "Guild owner" -msgstr "" - -#: discord.CategoryChannel.permissions_for:6 -#: discord.TextChannel.permissions_for:6 discord.VoiceChannel.permissions_for:6 -#: discord.abc.GuildChannel.permissions_for:6 of -msgid "Guild roles" -msgstr "" - -#: discord.CategoryChannel.permissions_for:7 -#: discord.TextChannel.permissions_for:7 discord.VoiceChannel.permissions_for:7 -#: discord.abc.GuildChannel.permissions_for:7 of -msgid "Channel overrides" -msgstr "" - -#: discord.CategoryChannel.permissions_for:8 -#: discord.TextChannel.permissions_for:8 discord.VoiceChannel.permissions_for:8 -#: discord.abc.GuildChannel.permissions_for:8 of -msgid "Member overrides" -msgstr "" - -#: discord.CategoryChannel.permissions_for:10 -#: discord.TextChannel.permissions_for:10 -#: discord.VoiceChannel.permissions_for:10 -#: discord.abc.GuildChannel.permissions_for:10 of -msgid "The member to resolve permissions for." -msgstr "" - -#: discord.CategoryChannel.permissions_for:13 discord.Member.permissions_in:12 -#: discord.TextChannel.permissions_for:13 -#: discord.VoiceChannel.permissions_for:13 -#: discord.abc.GuildChannel.permissions_for:13 of -msgid "The resolved permissions for the member." -msgstr "" - -#: discord.CategoryChannel.permissions_for:14 -#: discord.TextChannel.permissions_for:14 -#: discord.VoiceChannel.permissions_for:14 -#: discord.abc.GuildChannel.permissions_for:14 of -msgid ":class:`~discord.Permissions`" -msgstr "" - -#: discord.CategoryChannel.delete:3 discord.TextChannel.delete:3 -#: discord.VoiceChannel.delete:3 discord.abc.GuildChannel.delete:3 of -msgid "Deletes the channel." -msgstr "" - -#: discord.CategoryChannel.delete:5 discord.TextChannel.delete:5 -#: discord.VoiceChannel.delete:5 discord.abc.GuildChannel.delete:5 of -#, fuzzy -msgid "You must have :attr:`~Permissions.manage_channels` permission to use this." -msgstr "これを行うためには、そのチャンネルの :attr:`~.Permissions.read_message_history` 権限が必要です。" - -#: discord.CategoryChannel.delete:7 discord.TextChannel.delete:7 -#: discord.VoiceChannel.delete:7 discord.abc.GuildChannel.delete:7 of -msgid "The reason for deleting this channel. Shows up on the audit log." -msgstr "" - -#: discord.CategoryChannel.delete:11 discord.TextChannel.delete:11 -#: discord.VoiceChannel.delete:11 discord.abc.GuildChannel.delete:11 of -#, fuzzy -msgid "You do not have proper permissions to delete the channel." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.CategoryChannel.delete:12 discord.TextChannel.delete:12 -#: discord.VoiceChannel.delete:12 discord.abc.GuildChannel.delete:12 of -#, fuzzy -msgid "The channel was not found or was already deleted." -msgstr "作成、または削除されたギルドチャンネル。" - -#: discord.CategoryChannel.delete:13 discord.TextChannel.delete:13 -#: discord.VoiceChannel.delete:13 discord.abc.GuildChannel.delete:13 of -#, fuzzy -msgid "Deleting the channel failed." -msgstr ":exc:`.HTTPException` -- チャンネルの取得に失敗した。" - -#: discord.CategoryChannel.set_permissions:3 -#: discord.TextChannel.set_permissions:3 discord.VoiceChannel.set_permissions:3 -#: discord.abc.GuildChannel.set_permissions:3 of -msgid "" -"Sets the channel specific permission overwrites for a target in the " -"channel." -msgstr "" - -#: discord.CategoryChannel.set_permissions:6 -#: discord.TextChannel.set_permissions:6 discord.VoiceChannel.set_permissions:6 -#: discord.abc.GuildChannel.set_permissions:6 of -msgid "" -"The ``target`` parameter should either be a :class:`~discord.Member` or a" -" :class:`~discord.Role` that belongs to guild." -msgstr "" - -#: discord.CategoryChannel.set_permissions:9 -#: discord.TextChannel.set_permissions:9 discord.VoiceChannel.set_permissions:9 -#: discord.abc.GuildChannel.set_permissions:9 of -msgid "" -"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." -msgstr "" - -#: discord.CategoryChannel.set_permissions:15 -#: discord.TextChannel.set_permissions:15 -#: discord.VoiceChannel.set_permissions:15 -#: discord.abc.GuildChannel.set_permissions:15 of -msgid "" -"If the ``overwrite`` parameter is ``None``, then the permission " -"overwrites are deleted." -msgstr "" - -#: discord.CategoryChannel.set_permissions:18 discord.Member.add_roles:5 -#: discord.Member.remove_roles:5 discord.Role.delete:5 discord.Role.edit:5 -#: discord.TextChannel.set_permissions:18 -#: discord.VoiceChannel.set_permissions:18 -#: discord.abc.GuildChannel.set_permissions:18 of -msgid "" -"You must have the :attr:`~Permissions.manage_roles` permission to use " -"this." -msgstr "" - -#: discord.CategoryChannel.set_permissions:22 -#: discord.TextChannel.set_permissions:22 -#: discord.VoiceChannel.set_permissions:22 -#: discord.abc.GuildChannel.set_permissions:22 of -msgid "Setting allow and deny: ::" -msgstr "" - -#: discord.CategoryChannel.set_permissions:27 -#: discord.TextChannel.set_permissions:27 -#: discord.VoiceChannel.set_permissions:27 -#: discord.abc.GuildChannel.set_permissions:27 of -msgid "Deleting overwrites ::" -msgstr "" - -#: discord.CategoryChannel.set_permissions:31 -#: discord.TextChannel.set_permissions:31 -#: discord.VoiceChannel.set_permissions:31 -#: discord.abc.GuildChannel.set_permissions:31 of -msgid "Using :class:`~discord.PermissionOverwrite` ::" -msgstr "" - -#: discord.CategoryChannel.set_permissions:38 -#: discord.TextChannel.set_permissions:38 -#: discord.VoiceChannel.set_permissions:38 -#: discord.abc.GuildChannel.set_permissions:38 of -msgid "The member or role to overwrite permissions for." -msgstr "" - -#: discord.CategoryChannel.set_permissions:40 -#: discord.TextChannel.set_permissions:40 -#: discord.VoiceChannel.set_permissions:40 -#: discord.abc.GuildChannel.set_permissions:40 of -msgid "" -"The permissions to allow and deny to the target, or ``None`` to delete " -"the overwrite." -msgstr "" - -#: discord.CategoryChannel.set_permissions:43 -#: discord.TextChannel.set_permissions:43 -#: discord.VoiceChannel.set_permissions:43 -#: discord.abc.GuildChannel.set_permissions:43 of -msgid "" -"A keyword argument list of permissions to set for ease of use. Cannot be " -"mixed with ``overwrite``." -msgstr "" - -#: discord.CategoryChannel.set_permissions:45 discord.Guild.prune_members:21 -#: discord.Guild.unban:12 discord.Member.move_to:16 -#: discord.TextChannel.set_permissions:45 -#: discord.VoiceChannel.set_permissions:45 -#: discord.abc.GuildChannel.set_permissions:45 of -msgid "The reason for doing this action. Shows up on the audit log." -msgstr "" - -#: discord.CategoryChannel.set_permissions:48 -#: discord.TextChannel.set_permissions:48 -#: discord.VoiceChannel.set_permissions:48 -#: discord.abc.GuildChannel.set_permissions:48 of -msgid "You do not have permissions to edit channel specific permissions." -msgstr "" - -#: discord.CategoryChannel.set_permissions:49 -#: discord.TextChannel.set_permissions:49 -#: discord.VoiceChannel.set_permissions:49 -#: discord.abc.GuildChannel.set_permissions:49 of -#, fuzzy -msgid "Editing channel specific permissions failed." -msgstr "権限を確認したいチャンネル。" - -#: discord.CategoryChannel.set_permissions:50 -#: discord.TextChannel.set_permissions:50 -#: discord.VoiceChannel.set_permissions:50 -#: discord.abc.GuildChannel.set_permissions:50 of -msgid "The role or member being edited is not part of the guild." -msgstr "" - -#: discord.CategoryChannel.set_permissions:51 -#: discord.TextChannel.set_permissions:51 -#: discord.VoiceChannel.set_permissions:51 -#: discord.abc.GuildChannel.set_permissions:51 of -msgid "" -"The overwrite parameter invalid or the target type was not " -":class:`~discord.Role` or :class:`~discord.Member`." -msgstr "" - -#: discord.CategoryChannel.clone:3 discord.TextChannel.clone:3 -#: discord.VoiceChannel.clone:3 discord.abc.GuildChannel.clone:3 of -msgid "" -"Clones this channel. This creates a channel with the same properties as " -"this channel." -msgstr "" - -#: discord.CategoryChannel.clone:6 discord.TextChannel.clone:6 -#: discord.VoiceChannel.clone:6 discord.abc.GuildChannel.clone:6 of -#, fuzzy -msgid "" -"You must have the :attr:`~discord.Permissions.manage_channels` permission" -" to do this." -msgstr "これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` 権限が必要です。" - -#: discord.CategoryChannel.clone:11 discord.TextChannel.clone:11 -#: discord.VoiceChannel.clone:11 discord.abc.GuildChannel.clone:11 of -msgid "" -"The name of the new channel. If not provided, defaults to this channel " -"name." -msgstr "" - -#: discord.CategoryChannel.clone:14 discord.TextChannel.clone:14 -#: discord.VoiceChannel.clone:14 discord.abc.GuildChannel.clone:14 of -msgid "The reason for cloning this channel. Shows up on the audit log." -msgstr "" - -#: discord.CategoryChannel.clone:17 discord.Guild.create_category:10 -#: discord.Guild.create_category_channel:10 -#: discord.Guild.create_text_channel:60 discord.Guild.create_voice_channel:11 -#: discord.TextChannel.clone:17 discord.VoiceChannel.clone:17 -#: discord.abc.GuildChannel.clone:17 of -#, fuzzy -msgid "You do not have the proper permissions to create this channel." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.CategoryChannel.clone:18 discord.Guild.create_category:11 -#: discord.Guild.create_category_channel:11 -#: discord.Guild.create_text_channel:61 discord.Guild.create_voice_channel:12 -#: discord.TextChannel.clone:18 discord.VoiceChannel.clone:18 -#: discord.abc.GuildChannel.clone:18 of -#, fuzzy -msgid "Creating the channel failed." -msgstr ":exc:`.HTTPException` -- チャンネルの取得に失敗した。" - -#: discord.CategoryChannel.clone:20 discord.Member.create_dm:6 -#: discord.TextChannel.clone:20 discord.User.create_dm:6 -#: discord.VoiceChannel.clone:20 discord.abc.GuildChannel.clone:20 of -#, fuzzy -msgid "The channel that was created." -msgstr "チャンネルが作成されました。" - -#: discord.CategoryChannel.clone:21 discord.TextChannel.clone:21 -#: discord.VoiceChannel.clone:21 discord.abc.GuildChannel.clone:21 of -#, fuzzy -msgid ":class:`.abc.GuildChannel`" -msgstr ":class:`.Guild`" - -#: discord.CategoryChannel.create_invite:3 discord.TextChannel.create_invite:3 -#: discord.VoiceChannel.create_invite:3 -#: discord.abc.GuildChannel.create_invite:3 of -msgid "Creates an instant invite." -msgstr "" - -#: discord.CategoryChannel.create_invite:5 discord.TextChannel.create_invite:5 -#: discord.VoiceChannel.create_invite:5 -#: discord.abc.GuildChannel.create_invite:5 of -#, fuzzy -msgid "" -"You must have the :attr:`~Permissions.create_instant_invite` permission " -"to do this." -msgstr "これを行うためには、そのチャンネルの :attr:`~.Permissions.read_message_history` 権限が必要です。" - -#: discord.CategoryChannel.create_invite:8 discord.TextChannel.create_invite:8 -#: discord.VoiceChannel.create_invite:8 -#: discord.abc.GuildChannel.create_invite:8 of -msgid "" -"How long the invite should last in seconds. If it's 0 then the invite " -"doesn't expire. Defaults to ``0``." -msgstr "" - -#: discord.CategoryChannel.create_invite:11 -#: discord.TextChannel.create_invite:11 discord.VoiceChannel.create_invite:11 -#: discord.abc.GuildChannel.create_invite:11 of -msgid "" -"How many uses the invite could be used for. If it's 0 then there are " -"unlimited uses. Defaults to ``0``." -msgstr "" - -#: discord.CategoryChannel.create_invite:14 -#: discord.TextChannel.create_invite:14 discord.VoiceChannel.create_invite:14 -#: discord.abc.GuildChannel.create_invite:14 of -msgid "" -"Denotes that the invite grants temporary membership (i.e. they get kicked" -" after they disconnect). Defaults to ``False``." -msgstr "" - -#: discord.CategoryChannel.create_invite:17 -#: discord.TextChannel.create_invite:17 discord.VoiceChannel.create_invite:17 -#: discord.abc.GuildChannel.create_invite:17 of -msgid "" -"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." -msgstr "" - -#: discord.CategoryChannel.create_invite:21 -#: discord.TextChannel.create_invite:21 discord.VoiceChannel.create_invite:21 -#: discord.abc.GuildChannel.create_invite:21 of -msgid "The reason for creating this invite. Shows up on the audit log." -msgstr "" - -#: discord.CategoryChannel.create_invite:24 -#: discord.TextChannel.create_invite:24 discord.VoiceChannel.create_invite:24 -#: discord.abc.GuildChannel.create_invite:24 of -#, fuzzy -msgid "Invite creation failed." -msgstr "招待の作成。" - -#: discord.CategoryChannel.create_invite:27 -#: discord.TextChannel.create_invite:27 discord.VoiceChannel.create_invite:27 -#: discord.abc.GuildChannel.create_invite:27 of -msgid ":class:`~discord.Invite`" -msgstr "" - -#: discord.CategoryChannel.invites:3 discord.TextChannel.invites:3 -#: discord.VoiceChannel.invites:3 discord.abc.GuildChannel.invites:3 of -msgid "Returns a list of all active instant invites from this channel." -msgstr "" - -#: discord.CategoryChannel.invites:5 discord.TextChannel.invites:5 -#: discord.VoiceChannel.invites:5 discord.abc.GuildChannel.invites:5 of -#, fuzzy -msgid "You must have :attr:`~Permissions.manage_guild` to get this information." -msgstr "これを行うためには、そのチャンネルの :attr:`~.Permissions.read_message_history` 権限が必要です。" - -#: discord.CategoryChannel.invites:7 discord.Guild.bans:13 -#: discord.Guild.fetch_ban:13 discord.Guild.invites:8 -#: discord.TextChannel.invites:7 discord.VoiceChannel.invites:7 -#: discord.abc.GuildChannel.invites:7 of -#, fuzzy -msgid "You do not have proper permissions to get the information." -msgstr "この情報を取得するためには、ギルドのウィジェットを有効化しておく必要があります。" - -#: discord.CategoryChannel.invites:8 discord.Guild.bans:14 -#: discord.Guild.fetch_ban:15 discord.Guild.invites:9 -#: discord.TextChannel.invites:8 discord.VoiceChannel.invites:8 -#: discord.abc.GuildChannel.invites:8 of -msgid "An error occurred while fetching the information." -msgstr "" - -#: discord.CategoryChannel.invites:10 discord.Guild.invites:11 -#: discord.TextChannel.invites:10 discord.VoiceChannel.invites:10 -#: discord.abc.GuildChannel.invites:10 of -msgid "The list of invites that are currently active." -msgstr "" - -#: discord.CategoryChannel.invites:11 discord.TextChannel.invites:11 -#: discord.VoiceChannel.invites:11 discord.abc.GuildChannel.invites:11 of -msgid "List[:class:`~discord.Invite`]" -msgstr "" - -#: discord.abc.Messageable:1 of -msgid "" -"An ABC that details the common operations on a model that can send " -"messages." -msgstr "" - -#: discord.abc.Messageable:10 of -msgid ":class:`~discord.ext.commands.Context`" -msgstr "" - -#: discord.DMChannel.history:1 discord.GroupChannel.history:1 -#: discord.Member.history:1 discord.TextChannel.history:1 -#: discord.User.history:1 discord.abc.Messageable.history:1 of -msgid "" -"Returns an :class:`~discord.AsyncIterator` that enables receiving the " -"destination's message history." -msgstr "" - -#: discord.DMChannel.history:3 discord.GroupChannel.history:3 -#: discord.Member.history:3 discord.TextChannel.history:3 -#: discord.User.history:3 discord.abc.Messageable.history:3 of -#, fuzzy -msgid "" -"You must have :attr:`~Permissions.read_message_history` permissions to " -"use this." -msgstr "これを行うためには、そのチャンネルの :attr:`~.Permissions.read_message_history` 権限が必要です。" - -#: discord.DMChannel.history:14 discord.GroupChannel.history:14 -#: discord.Member.history:14 discord.Reaction.users:14 -#: discord.TextChannel.history:14 discord.User.history:14 -#: discord.abc.Messageable.history:14 of -msgid "Flattening into a list: ::" -msgstr "" - -#: discord.DMChannel.history:21 discord.GroupChannel.history:21 -#: discord.Member.history:21 discord.TextChannel.history:21 -#: discord.User.history:21 discord.abc.Messageable.history:21 of -msgid "" -"The number of messages to retrieve. If ``None``, retrieves every message " -"in the channel. Note, however, that this would make it a slow operation." -msgstr "" - -#: discord.DMChannel.history:25 discord.GroupChannel.history:25 -#: discord.Member.history:25 discord.TextChannel.history:25 -#: discord.User.history:25 discord.abc.Messageable.history:25 of -msgid "" -"Retrieve messages before this date or message. If a date is provided it " -"must be a timezone-naive datetime representing UTC time." -msgstr "" - -#: discord.DMChannel.history:28 discord.GroupChannel.history:28 -#: discord.Member.history:28 discord.TextChannel.history:28 -#: discord.User.history:28 discord.abc.Messageable.history:28 of -msgid "" -"Retrieve messages after this date or message. If a date is provided it " -"must be a timezone-naive datetime representing UTC time." -msgstr "" - -#: discord.DMChannel.history:31 discord.GroupChannel.history:31 -#: discord.Member.history:31 discord.TextChannel.history:31 -#: discord.User.history:31 discord.abc.Messageable.history:31 of -msgid "" -"Retrieve messages around this date or message. If a date is provided it " -"must be a timezone-naive datetime representing UTC 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." -msgstr "" - -#: discord.DMChannel.history:36 discord.GroupChannel.history:36 -#: discord.Member.history:36 discord.TextChannel.history:36 -#: discord.User.history:36 discord.abc.Messageable.history:36 of -msgid "" -"If set to ``True``, return messages in oldest->newest order. Defaults to " -"``True`` if ``after`` is specified, otherwise ``False``." -msgstr "" - -#: discord.DMChannel.history:40 discord.GroupChannel.history:40 -#: discord.Member.history:40 discord.TextChannel.history:40 -#: discord.User.history:40 discord.abc.Messageable.history:40 of -#, fuzzy -msgid "You do not have permissions to get channel message history." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.DMChannel.history:41 discord.GroupChannel.history:41 -#: discord.Member.history:41 discord.TextChannel.history:41 -#: discord.User.history:41 discord.abc.Messageable.history:41 of -msgid "The request to get message history failed." -msgstr "" - -#: discord.DMChannel.history:43 discord.GroupChannel.history:43 -#: discord.Member.history:43 discord.TextChannel.history:43 -#: discord.User.history:43 discord.abc.Messageable.history:43 of -msgid ":class:`~discord.Message` -- The message with the message data parsed." -msgstr "" - -#: discord.DMChannel.typing:1 discord.GroupChannel.typing:1 -#: discord.Member.typing:1 discord.TextChannel.typing:1 discord.User.typing:1 -#: discord.abc.Messageable.typing:1 of -msgid "" -"Returns a context manager that allows you to type for an indefinite " -"period of time." -msgstr "" - -#: discord.DMChannel.typing:3 discord.GroupChannel.typing:3 -#: discord.Member.typing:3 discord.TextChannel.typing:3 discord.User.typing:3 -#: discord.abc.Messageable.typing:3 of -msgid "This is useful for denoting long computations in your bot." -msgstr "" - -#: discord.DMChannel.typing:7 discord.GroupChannel.typing:7 -#: discord.Member.typing:7 discord.TextChannel.typing:7 discord.User.typing:7 -#: discord.abc.Messageable.typing:7 of -msgid "" -"This is both a regular context manager and an async context manager. This" -" means that both ``with`` and ``async with`` work with this." -msgstr "" - -#: discord.DMChannel.typing:10 discord.GroupChannel.typing:10 -#: discord.Member.typing:10 discord.TextChannel.typing:10 -#: discord.User.typing:10 discord.abc.Messageable.typing:10 of -msgid "Example Usage: ::" -msgstr "" - -#: discord.DMChannel.send:3 discord.GroupChannel.send:3 discord.Member.send:3 -#: discord.TextChannel.send:3 discord.User.send:3 -#: discord.abc.Messageable.send:3 of -msgid "Sends a message to the destination with the content given." -msgstr "" - -#: discord.DMChannel.send:5 discord.GroupChannel.send:5 discord.Member.send:5 -#: discord.TextChannel.send:5 discord.User.send:5 -#: discord.abc.Messageable.send:5 of -msgid "" -"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." -msgstr "" - -#: discord.DMChannel.send:9 discord.GroupChannel.send:9 discord.Member.send:9 -#: discord.TextChannel.send:9 discord.User.send:9 -#: discord.abc.Messageable.send:9 of -msgid "" -"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**." -msgstr "" - -#: discord.DMChannel.send:14 discord.GroupChannel.send:14 -#: discord.Member.send:14 discord.TextChannel.send:14 discord.User.send:14 -#: discord.abc.Messageable.send:14 of -msgid "" -"If the ``embed`` parameter is provided, it must be of type " -":class:`~discord.Embed` and it must be a rich embed type." -msgstr "" - -#: discord.DMChannel.send:21 discord.GroupChannel.send:21 -#: discord.Member.send:21 discord.TextChannel.send:21 discord.User.send:21 -#: discord.abc.Messageable.send:21 of -msgid "The rich embed for the content." -msgstr "" - -#: discord.DMChannel.send:23 discord.GroupChannel.send:23 -#: discord.Member.send:23 discord.TextChannel.send:23 discord.User.send:23 -#: discord.abc.Messageable.send:23 of -msgid "The file to upload." -msgstr "" - -#: discord.DMChannel.send:25 discord.GroupChannel.send:25 -#: discord.Member.send:25 discord.TextChannel.send:25 discord.User.send:25 -#: discord.abc.Messageable.send:25 of -msgid "A list of files to upload. Must be a maximum of 10." -msgstr "" - -#: discord.DMChannel.send:27 discord.GroupChannel.send:27 -#: discord.Member.send:27 discord.TextChannel.send:27 discord.User.send:27 -#: discord.abc.Messageable.send:27 of -msgid "" -"The nonce to use for sending this message. If the message was " -"successfully sent, then the message will have a nonce with this value." -msgstr "" - -#: discord.DMChannel.send:30 discord.GroupChannel.send:30 -#: discord.Member.send:30 discord.TextChannel.send:30 discord.User.send:30 -#: discord.abc.Messageable.send:30 of -msgid "" -"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." -msgstr "" - -#: discord.DMChannel.send:34 discord.GroupChannel.send:34 -#: discord.Member.send:34 discord.TextChannel.send:34 discord.User.send:34 -#: discord.abc.Messageable.send:34 of -msgid "" -"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. .. versionadded:: 1.4" -msgstr "" - -#: discord.DMChannel.send:34 discord.GroupChannel.send:34 -#: discord.Member.send:34 discord.TextChannel.send:34 discord.User.send:34 -#: discord.abc.Messageable.send:34 of -msgid "" -"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." -msgstr "" - -#: discord.DMChannel.send:45 discord.GroupChannel.send:45 -#: discord.Member.send:45 discord.TextChannel.send:45 discord.User.send:45 -#: discord.abc.Messageable.send:45 of -msgid "You do not have the proper permissions to send the message." -msgstr "" - -#: discord.DMChannel.send:46 discord.GroupChannel.send:46 -#: discord.Member.send:46 discord.TextChannel.send:46 discord.User.send:46 -#: discord.abc.Messageable.send:46 of -msgid "" -"The ``files`` list is not of the appropriate size or you specified " -"both ``file`` and ``files``." -msgstr "" - -#: discord.DMChannel.fetch_message:15 discord.DMChannel.send:49 -#: discord.GroupChannel.fetch_message:15 discord.GroupChannel.send:49 -#: discord.Member.fetch_message:15 discord.Member.send:49 -#: discord.TextChannel.fetch_message:15 discord.TextChannel.send:49 -#: discord.User.fetch_message:15 discord.User.send:49 -#: discord.abc.Messageable.fetch_message:15 discord.abc.Messageable.send:49 of -msgid ":class:`~discord.Message`" -msgstr "" - -#: discord.DMChannel.trigger_typing:3 discord.GroupChannel.trigger_typing:3 -#: discord.Member.trigger_typing:3 discord.TextChannel.trigger_typing:3 -#: discord.User.trigger_typing:3 discord.abc.Messageable.trigger_typing:3 of -msgid "Triggers a *typing* indicator to the destination." -msgstr "" - -#: discord.DMChannel.trigger_typing:5 discord.GroupChannel.trigger_typing:5 -#: discord.Member.trigger_typing:5 discord.TextChannel.trigger_typing:5 -#: discord.User.trigger_typing:5 discord.abc.Messageable.trigger_typing:5 of -msgid "" -"*Typing* indicator will go away after 10 seconds, or after a message is " -"sent." -msgstr "" - -#: discord.DMChannel.fetch_message:3 discord.GroupChannel.fetch_message:3 -#: discord.Member.fetch_message:3 discord.TextChannel.fetch_message:3 -#: discord.User.fetch_message:3 discord.abc.Messageable.fetch_message:3 of -msgid "Retrieves a single :class:`~discord.Message` from the destination." -msgstr "" - -#: discord.DMChannel.fetch_message:5 discord.GroupChannel.fetch_message:5 -#: discord.Member.fetch_message:5 discord.TextChannel.fetch_message:5 -#: discord.User.fetch_message:5 discord.abc.Messageable.fetch_message:5 of -msgid "This can only be used by bot accounts." -msgstr "" - -#: discord.DMChannel.fetch_message:7 discord.GroupChannel.fetch_message:7 -#: discord.Member.fetch_message:7 discord.TextChannel.fetch_message:7 -#: discord.User.fetch_message:7 discord.abc.Messageable.fetch_message:7 of -msgid "The message ID to look for." -msgstr "" - -#: discord.DMChannel.fetch_message:10 discord.GroupChannel.fetch_message:10 -#: discord.Member.fetch_message:10 discord.TextChannel.fetch_message:10 -#: discord.User.fetch_message:10 discord.abc.Messageable.fetch_message:10 of -msgid "The specified message was not found." -msgstr "" - -#: discord.DMChannel.fetch_message:11 discord.GroupChannel.fetch_message:11 -#: discord.Member.fetch_message:11 discord.TextChannel.fetch_message:11 -#: discord.User.fetch_message:11 discord.abc.Messageable.fetch_message:11 of -msgid "You do not have the permissions required to get a message." -msgstr "" - -#: discord.DMChannel.fetch_message:12 discord.GroupChannel.fetch_message:12 -#: discord.Member.fetch_message:12 discord.TextChannel.fetch_message:12 -#: discord.User.fetch_message:12 discord.abc.Messageable.fetch_message:12 of -msgid "Retrieving the message failed." -msgstr "" - -#: discord.DMChannel.fetch_message:14 discord.GroupChannel.fetch_message:14 -#: discord.Member.fetch_message:14 discord.TextChannel.fetch_message:14 -#: discord.User.fetch_message:14 discord.abc.Messageable.fetch_message:14 of -msgid "The message asked for." -msgstr "" - -#: discord.DMChannel.pins:3 discord.GroupChannel.pins:3 discord.Member.pins:3 -#: discord.TextChannel.pins:3 discord.User.pins:3 -#: discord.abc.Messageable.pins:3 of -msgid "Retrieves all messages that are currently pinned in the channel." -msgstr "" - -#: discord.DMChannel.pins:7 discord.GroupChannel.pins:7 discord.Member.pins:7 -#: discord.TextChannel.pins:7 discord.User.pins:7 -#: discord.abc.Messageable.pins:7 of -msgid "" -"Due to a limitation with the Discord API, the :class:`.Message` objects " -"returned by this method do not contain complete " -":attr:`.Message.reactions` data." -msgstr "" - -#: discord.DMChannel.pins:11 discord.GroupChannel.pins:11 -#: discord.Member.pins:11 discord.TextChannel.pins:11 discord.User.pins:11 -#: discord.abc.Messageable.pins:11 of -msgid "Retrieving the pinned messages failed." -msgstr "" - -#: discord.DMChannel.pins:13 discord.GroupChannel.pins:13 -#: discord.Member.pins:13 discord.TextChannel.pins:13 discord.User.pins:13 -#: discord.abc.Messageable.pins:13 of -msgid "The messages that are currently pinned." -msgstr "" - -#: discord.DMChannel.pins:14 discord.GroupChannel.pins:14 -#: discord.Member.pins:14 discord.TextChannel.pins:14 discord.User.pins:14 -#: discord.abc.Messageable.pins:14 of -msgid "List[:class:`~discord.Message`]" -msgstr "" - -#: discord.abc.Connectable:1 of -msgid "" -"An ABC that details the common operations on a channel that can connect " -"to a voice server." -msgstr "" - -#: ../../api.rst:2565 -msgid "Discord Models" -msgstr "Discordモデル" - -#: ../../api.rst:2567 -msgid "" -"Models are classes that are received from Discord and are not meant to be" -" created by the user of the library." -msgstr "モデルはDiscordから受け取るクラスであり、ユーザーによって作成されることを想定していません。" - -#: ../../api.rst:2572 -msgid "" -"The classes listed below are **not intended to be created by users** and " -"are also **read-only**." -msgstr "下記のクラスは、 **ユーザーによって作成されることを想定しておらず** 、中には **読み取り専用** のものもあります。" - -#: ../../api.rst:2575 -msgid "" -"For example, this means that you should not make your own :class:`User` " -"instances nor should you modify the :class:`User` instance yourself." -msgstr "" -"つまり、独自の :class:`User` を作成は行うべきではなく、また、 :class:`User` " -"インスタンスの値の変更もするべきではありません。" - -#: ../../api.rst:2578 -msgid "" -"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`." -msgstr "" -"このようなモデルクラスのインスタンスを取得したい場合は、 キャッシュを経由して取得する必要があります。一般的な方法としては " -":func:`utils.find` 関数を用いるか、 :ref:`discord-api-events` " -"の特定のイベントから受け取る方法が挙げられます。" - -#: ../../api.rst:2585 ../../api.rst:2870 -msgid "" -"Nearly all classes here have :ref:`py:slots` defined which means that it " -"is impossible to have dynamic attributes to the data classes." -msgstr "ほぼすべてのクラスに :ref:`py:slots` が定義されています。つまり、データクラスに動的に変数を追加することは不可能です。" - -#: ../../api.rst:2590 -msgid "ClientUser" -msgstr "ClientUser" - -#: discord.ClientUser:1 of -msgid "Represents your Discord user." -msgstr "あなたのDiscordユーザーを表します。" - -#: discord.ClientUser:7 discord.User:7 of -msgid "Checks if two users are equal." -msgstr "二つのユーザーが等しいかを比較します。" - -#: discord.ClientUser:11 discord.User:11 of -msgid "Checks if two users are not equal." -msgstr "二つのユーザーが等しいものではないか比較します。" - -#: discord.ClientUser:15 discord.User:15 of -msgid "Return the user's hash." -msgstr "ユーザーのハッシュ値を返します。" - -#: discord.ClientUser:19 discord.User:19 of -msgid "Returns the user's name with discriminator." -msgstr "ユーザー名とディスクリミネータを返します。" - -#: discord.ClientUser:29 discord.User:29 of -#, fuzzy -msgid "The user's unique ID." -msgstr ":class:`int` -- ユーザーの一意のID。" - -#: discord.ClientUser:35 discord.User:35 of -#, fuzzy -msgid "The user's discriminator. This is given when the username has conflicts." -msgstr ":class:`str` -- ユーザーの識別子。これはユーザー名が重複しているときに与えられます。" - -#: discord.ClientUser:41 of -#, fuzzy -msgid "The avatar hash the user has. Could be ``None``." -msgstr "Optional[:class:`str`] -- ユーザーのアバターハッシュ。 Noneが返る場合もあります。" - -#: discord.ClientUser:53 discord.User:53 of -#, fuzzy -msgid "" -"Specifies if the user is a system user (i.e. represents Discord " -"officially)." -msgstr ":class:`bool` -- ユーザーがプレミアムユーザー (例えば Discord Nitro) であるかを表します。" - -#: discord.ClientUser:61 of -#, fuzzy -msgid "Specifies if the user is a verified account." -msgstr ":class:`bool` -- ユーザーが認証済みアカウントであるかを表します。" - -#: discord.ClientUser:67 of -#, fuzzy -msgid "The email the user used when registering." -msgstr "Optional[:class:`str`] -- ユーザーが登録時に使用したEメールアドレス。" - -#: discord.ClientUser:73 of -#, fuzzy -msgid "The IETF language tag used to identify the language the user is using." -msgstr "Optional[:class:`str`] -- ユーザーが使用している言語を識別するためのIETF言語タグ。" - -#: discord.ClientUser:79 of -#, fuzzy -msgid "Specifies if the user has MFA turned on and working." -msgstr ":class:`bool` -- ユーザーが二段階認証を行っているかを表します。" - -#: discord.ClientUser:85 of -#, fuzzy -msgid "Specifies if the user is a premium user (e.g. has Discord Nitro)." -msgstr ":class:`bool` -- ユーザーがプレミアムユーザー (例えば Discord Nitro) であるかを表します。" - -#: discord.ClientUser:91 of -#, fuzzy -msgid "" -"Specifies the type of premium a user has (e.g. Nitro or Nitro Classic). " -"Could be None if the user is not premium." -msgstr "" -":class:`PremiumType` -- ユーザーのプレミアムの種類 (例えばNitroやNitro Classic) " -"を表します。ユーザーがプレミアムでない場合、Noneが返ります。" - -#: discord.ClientUser:93 of -msgid "Optional[:class:`PremiumType`]" -msgstr "" - -#: discord.ClientUser.get_relationship:1 of -msgid "Retrieves the :class:`Relationship` if applicable." -msgstr "該当すれば :class:`Relationship` が返ります。" - -#: discord.ClientUser.get_relationship:7 of -msgid "The user ID to check if we have a relationship with them." -msgstr "リレーションシップがあるか確認したいユーザーのID。" - -#: discord.ClientUser.get_relationship:10 of -msgid "The relationship if available or ``None``." -msgstr "該当すればリレーションシップが返り、それ以外は ``None`` が返ります。" - -#: discord.ClientUser.get_relationship:11 discord.User.relationship:7 of -msgid "Optional[:class:`Relationship`]" -msgstr "" - -#: discord.ClientUser.relationships:1 of -#, fuzzy -msgid "Returns all the relationships that the user has." -msgstr "List[:class:`User`] -- ユーザーが持つすべてのリレーションシップを返します。" - -#: discord.CallMessage:16 discord.ClientUser.blocked:7 -#: discord.ClientUser.friends:7 discord.ClientUser.relationships:7 -#: discord.GroupCall:21 discord.GroupCall.connected:3 discord.GroupChannel:25 -#: discord.Member.mutual_friends:13 discord.User.mutual_friends:13 of -msgid "List[:class:`User`]" -msgstr "" - -#: discord.ClientUser.friends:1 of -#, fuzzy -msgid "Returns all the users that the user is friends with." -msgstr "List[:class:`User`] -- ユーザーのフレンドであるすべてのユーザーを返します。" - -#: discord.ClientUser.blocked:1 of -#, fuzzy -msgid "Returns all the users that the user has blocked." -msgstr "List[:class:`User`] -- ユーザーがブロックしているすべてのユーザーを返します。" - -#: discord.ClientUser.edit:3 of -msgid "Edits the current profile of the client." -msgstr "現在のクライアントのプロフィールを編集します。" - -#: discord.ClientUser.edit:5 of -msgid "" -"If a bot account is used then a password field is optional, otherwise it " -"is required." -msgstr "Botアカウントである場合はpasswordフィールドはオプションとなります。それ以外の場合は必須です。" - -#: discord.ClientUser.edit:10 of -msgid "" -"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()``." -msgstr "" -"アバターをアップロードする際には、アップロードする画像を表す :term:`py:bytes-like object` " -"を渡す必要があります。これをファイルを介して行う場合、ファイルを ``open('some_filename', 'rb')`` で開き、 " -":term:`py:bytes-like object` は ``fp.read()`` で取得できます。" - -#: discord.ClientUser.edit:15 of -msgid "The only image formats supported for uploading is JPEG and PNG." -msgstr "" - -#: discord.ClientUser.edit:17 of -msgid "" -"The current password for the client's account. Only applicable to user " -"accounts." -msgstr "クライアントの現在のパスワード。ユーザーアカウントでのみ適用可能です。" - -#: discord.ClientUser.edit:20 of -msgid "The new password you wish to change to. Only applicable to user accounts." -msgstr "変更する際の新しいパスワード。ユーザーアカウントでのみ適用可能です。" - -#: discord.ClientUser.edit:23 of -msgid "The new email you wish to change to. Only applicable to user accounts." -msgstr "変更する際の新しいEメールアドレス。ユーザーアカウントでのみ適用可能です。" - -#: discord.ClientUser.edit:26 of -msgid "" -"The hypesquad house you wish to change to. Could be ``None`` to leave the" -" current house. Only applicable to user accounts." -msgstr "" -"変更する際の新しいHypesquad house。現在のhouseから脱退したい場合は ``None`` " -"を指定してください。ユーザアカウントでのみ適用可能です。" - -#: discord.ClientUser.edit:30 of -msgid "The new username you wish to change to." -msgstr "変更する際の新しいユーザー名。" - -#: discord.ClientUser.edit:32 of -msgid "" -"A :term:`py:bytes-like object` representing the image to upload. Could be" -" ``None`` to denote no avatar." -msgstr "" -"アップロードする画像を表す :term:`py:bytes-like object` 。アバターをなしにしたい場合は ``None`` " -"を設定することが出来ます。" - -#: discord.ClientUser.edit:36 of -#, fuzzy -msgid "Editing your profile failed." -msgstr ":exc:`HTTPException` -- プロフィールの編集に失敗した。" - -#: discord.ClientUser.edit:37 of -#, fuzzy -msgid "Wrong image format passed for ``avatar``." -msgstr ":exc:`InvalidArgument` -- ``avatar`` に誤った形式の画像が渡された。" - -#: discord.ClientUser.edit:38 of -#, fuzzy -msgid "" -"Password is required for non-bot accounts. House field was not a " -"HypeSquadHouse." -msgstr "" -":exc:`ClientException` -- Botではないアカウントでpasswordが指定されていない。 " -"HouseフィールドがHypeSquadHouseでない。" - -#: discord.ClientUser.create_group:3 of -msgid "" -"Creates a group direct message with the recipients provided. These " -"recipients must be have a relationship of type " -":attr:`RelationshipType.friend`." -msgstr "" -"与えられたrecipientsを含むグループダイレクトメッセージを作成します。これを実行するにはrecipientsとの間に " -":attr:`RelationshipType.friend` のリレーションシップを持っていなければなりません。" - -#: discord.ClientUser.create_group:11 of -msgid "An argument :class:`list` of :class:`User` to have in your group." -msgstr "グループに参加させたい :class:`User` の :class:`list` 。" - -#: discord.ClientUser.create_group:15 of -#, fuzzy -msgid "Failed to create the group direct message." -msgstr ":exc:`HTTPException` -- グループダイレクトメッセージの作成に失敗した。" - -#: discord.ClientUser.create_group:16 of -msgid "" -"Attempted to create a group with only one recipient. This does not " -"include yourself." -msgstr "" - -#: discord.ClientUser.create_group:18 of -msgid "The new group channel." -msgstr "新しいグループチャンネル。" - -#: discord.ClientUser.create_group:19 of -msgid ":class:`GroupChannel`" -msgstr "" - -#: discord.ClientUser.edit_settings:3 of -msgid "Edits the client user's settings." -msgstr "クライアントユーザーの設定を変更します。" - -#: discord.ClientUser.edit_settings:9 of -msgid "" -"How long (in seconds) the user needs to be AFK until Discord sends push " -"notifications to your mobile device." -msgstr "" - -#: discord.ClientUser.edit_settings:12 of -msgid "Whether or not to animate emojis in the chat." -msgstr "" - -#: discord.ClientUser.edit_settings:14 of -msgid "" -"Whether or not to automatically convert emoticons into emojis. e.g. :-) " -"-> 😃" -msgstr "" - -#: discord.ClientUser.edit_settings:17 of -msgid "" -"Whether or not to automatically disable DMs between you and members of " -"new guilds you join." -msgstr "" - -#: discord.ClientUser.edit_settings:20 of -msgid "" -"Whether or not to automatically detect accounts from services like Steam " -"and Blizzard when you open the Discord client." -msgstr "" - -#: discord.ClientUser.edit_settings:23 of -msgid "Whether or not to enable developer mode." -msgstr "" - -#: discord.ClientUser.edit_settings:25 of -msgid "Whether or not to disable the showing of the Games tab." -msgstr "" - -#: discord.ClientUser.edit_settings:27 of -msgid "Whether or not to allow tts messages to be played/sent." -msgstr "" - -#: discord.ClientUser.edit_settings:29 of -msgid "The filter for explicit content in all messages." -msgstr "" - -#: discord.ClientUser.edit_settings:31 of -msgid "Who can add you as a friend." -msgstr "" - -#: discord.ClientUser.edit_settings:33 of -msgid "Whether or not to automatically play gifs that are in the chat." -msgstr "" - -#: discord.ClientUser.edit_settings:35 of -msgid "" -"A list of guilds in order of the guild/guild icons that are on the left " -"hand side of the UI." -msgstr "" - -#: discord.ClientUser.edit_settings:38 of -msgid "Whether or not to display attachments when they are uploaded in chat." -msgstr "" - -#: discord.ClientUser.edit_settings:40 of -msgid "Whether or not to display videos and images from links posted in chat." -msgstr "" - -#: discord.ClientUser.edit_settings:42 of -msgid "" -"The :rfc:`3066` language identifier of the locale to use for the language" -" of the Discord client." -msgstr "" - -#: discord.ClientUser.edit_settings:45 of -msgid "Whether or not to use the compact Discord display mode." -msgstr "" - -#: discord.ClientUser.edit_settings:47 of -msgid "Whether or not to render embeds that are sent in the chat." -msgstr "" - -#: discord.ClientUser.edit_settings:49 of -msgid "Whether or not to render reactions that are added to messages." -msgstr "" - -#: discord.ClientUser.edit_settings:51 of -msgid "A list of guilds that you will not receive DMs from." -msgstr "" - -#: discord.ClientUser.edit_settings:53 of -msgid "Whether or not to display the game that you are currently playing." -msgstr "" - -#: discord.ClientUser.edit_settings:55 of -msgid "The clients status that is shown to others." -msgstr "" - -#: discord.ClientUser.edit_settings:57 of -msgid "The theme of the Discord UI." -msgstr "" - -#: discord.ClientUser.edit_settings:59 of -msgid "The timezone offset to use." -msgstr "" - -#: discord.ClientUser.edit_settings:62 of -#, fuzzy -msgid "Editing the settings failed." -msgstr ":exc:`HTTPException` -- 設定の編集に失敗した。" - -#: discord.ClientUser.edit_settings:63 of -#, fuzzy -msgid "The client is a bot user and not a user account." -msgstr ":exc:`Forbidden` -- クライアントがBotユーザーであり、ユーザーアカウントでない。" - -#: discord.ClientUser.edit_settings:65 of -msgid "The client user's updated settings." -msgstr "クライアントユーザーの更新された設定。" - -#: discord.Activity:57 discord.Activity:69 discord.Activity:78 -#: discord.ClientUser.edit_settings:66 discord.RawMessageUpdateEvent:21 -#: discord.Streaming:61 of -msgid ":class:`dict`" -msgstr "" - -#: discord.ClientUser.avatar_url:1 discord.ClientUser.avatar_url_as:1 -#: discord.Member.avatar_url_as:1 discord.User.avatar_url:1 -#: discord.User.avatar_url_as:1 discord.WidgetMember.avatar_url:1 -#: discord.WidgetMember.avatar_url_as:1 of -msgid "Returns an :class:`Asset` for the avatar the user has." -msgstr "" - -#: discord.ClientUser.avatar_url:3 discord.ClientUser.avatar_url_as:3 -#: discord.Member.avatar_url_as:3 discord.User.avatar_url:3 -#: discord.User.avatar_url_as:3 discord.WidgetMember.avatar_url:3 -#: discord.WidgetMember.avatar_url_as:3 of -msgid "" -"If the user does not have a traditional avatar, an asset for the default " -"avatar is returned instead." -msgstr "" - -#: discord.ClientUser.avatar_url:6 discord.User.avatar_url:6 -#: discord.WidgetMember.avatar_url:6 of -msgid "" -"This is equivalent to calling :meth:`avatar_url_as` with the default " -"parameters (i.e. webp/gif detection and a size of 1024)." -msgstr "" -"これはデフォルトパラメータ(webp/gif フォーマット及びサイズが1024)で :meth:`avatar_url_as` " -"を呼び出すのと同等の処理です。" - -#: discord.ClientUser.avatar_url_as:6 discord.Guild.icon_url_as:3 -#: discord.Member.avatar_url_as:6 discord.User.avatar_url_as:6 -#: discord.WidgetMember.avatar_url_as:6 of -msgid "" -"The format must be one of 'webp', 'jpeg', 'jpg', 'png' or 'gif', and " -"'gif' is only valid for animated avatars. The size must be a power of 2 " -"between 16 and 4096." -msgstr "" - -#: discord.ClientUser.avatar_url_as:10 discord.Member.avatar_url_as:10 -#: discord.User.avatar_url_as:10 discord.WidgetMember.avatar_url_as:10 of -msgid "" -"The format to attempt to convert the avatar to. If the format is " -"``None``, then it is automatically detected into either 'gif' or " -"static_format depending on the avatar being animated or not." -msgstr "" -"アバターのフォーマット。 ``None`` の場合はアニメーションアバターなら 「gif」、それ以外は static_format " -"のフォーマットに自動的に変換されます。" - -#: discord.ClientUser.avatar_url_as:15 discord.Member.avatar_url_as:15 -#: discord.User.avatar_url_as:15 discord.WidgetMember.avatar_url_as:15 of -msgid "" -"Format to attempt to convert only non-animated avatars to. Defaults to " -"'webp'" -msgstr "アバターがアニメーションでない場合に変換されるフォーマット。デフォルトでは「webp」です。" - -#: discord.ClientUser.avatar_url_as:21 discord.Member.avatar_url_as:21 -#: discord.User.avatar_url_as:21 discord.WidgetMember.avatar_url_as:21 of -msgid "" -"Bad image format passed to ``format`` or ``static_format``, or " -"invalid ``size``." -msgstr "" - -#: discord.ClientUser.color:1 discord.User.color:1 discord.WidgetMember.color:1 -#: of -msgid "" -"A property that returns a color denoting the rendered color for the user." -" This always returns :meth:`Colour.default`." -msgstr "" - -#: discord.ClientUser.color:4 discord.Member.color:5 discord.User.color:4 -#: discord.WidgetMember.color:4 of -msgid "There is an alias for this named :attr:`colour`." -msgstr "" - -#: discord.ClientUser.colour:1 discord.User.colour:1 -#: discord.WidgetMember.colour:1 of -msgid "" -"A property that returns a colour denoting the rendered colour for the " -"user. This always returns :meth:`Colour.default`." -msgstr "" - -#: discord.ClientUser.colour:4 discord.Member.colour:5 discord.User.colour:4 -#: discord.WidgetMember.colour:4 of -msgid "There is an alias for this named :attr:`color`." -msgstr "" - -#: discord.ClientUser.created_at:1 discord.User.created_at:1 -#: discord.WidgetMember.created_at:1 of -#, fuzzy -msgid "Returns the user's creation time in UTC." -msgstr "ユーザー名とディスクリミネータを返します。" - -#: discord.ClientUser.created_at:3 discord.User.created_at:3 -#: discord.WidgetMember.created_at:3 of -#, fuzzy -msgid "This is when the user's Discord account was created." -msgstr "これはユーザーのDiscordアカウントが作成された時間です。" - -#: discord.ClientUser.default_avatar:1 discord.User.default_avatar:1 -#: discord.WidgetMember.default_avatar:1 of -msgid "" -"Returns the default avatar for a given user. This is calculated by the " -"user's discriminator." -msgstr "" - -#: discord.ClientUser.default_avatar:3 discord.User.default_avatar:3 -#: discord.WidgetMember.default_avatar:3 of -#, fuzzy -msgid ":class:`DefaultAvatar`" -msgstr ":class:`str`" - -#: discord.ClientUser.default_avatar_url:1 discord.User.default_avatar_url:1 -#: discord.WidgetMember.default_avatar_url:1 of -msgid "Returns a URL for a user's default avatar." -msgstr "" - -#: discord.ClientUser.display_name:3 discord.Member.display_name:3 -#: discord.User.display_name:3 of -msgid "" -"For regular users this is just their username, but if they have a guild " -"specific nickname then that is returned instead." -msgstr "通常であれば、これはユーザー名がそのまま返りますが、ギルドにてニックネームを設定している場合は、代替としてニックネームが返ります。" - -#: discord.ClientUser.is_avatar_animated:1 discord.Member.is_avatar_animated:1 -#: discord.User.is_avatar_animated:1 discord.WidgetMember.is_avatar_animated:1 -#: of -#, fuzzy -msgid ":class:`bool`: Indicates if the user has an animated avatar." -msgstr ":class:`bool` -- ユーザーが認証済みアカウントであるかを表します。" - -#: discord.ClientUser.mentioned_in:1 discord.User.mentioned_in:1 -#: discord.WidgetMember.mentioned_in:1 of -msgid "Checks if the user is mentioned in the specified message." -msgstr "指定のメッセージにユーザーに対するメンションが含まれているかを確認します。" - -#: discord.ClientUser.mentioned_in:3 discord.Member.mentioned_in:3 -#: discord.User.mentioned_in:3 discord.WidgetMember.mentioned_in:3 of -msgid "The message to check if you're mentioned in." -msgstr "メンションが含まれているかを確認するメッセージ。" - -#: discord.ClientUser.mentioned_in:6 discord.User.mentioned_in:6 -#: discord.WidgetMember.mentioned_in:6 of -#, fuzzy -msgid "Indicates if the user is mentioned in the message." -msgstr "指定のメッセージにユーザーに対するメンションが含まれているかを確認します。" - -#: discord.ClientUser.permissions_in:1 discord.Member.permissions_in:1 -#: discord.User.permissions_in:1 discord.WidgetMember.permissions_in:1 of -msgid "An alias for :meth:`abc.GuildChannel.permissions_for`." -msgstr ":meth:`abc.GuildChannel.permissions_for` のエイリアス。" - -#: discord.ClientUser.permissions_in:3 discord.Member.permissions_in:3 -#: discord.User.permissions_in:3 discord.WidgetMember.permissions_in:3 of -msgid "Basically equivalent to:" -msgstr "基本的には以下と同等です:" - -#: discord.ClientUser.permissions_in:9 discord.Member.permissions_in:9 -#: discord.User.permissions_in:9 discord.WidgetMember.permissions_in:9 of -msgid "The channel to check your permissions for." -msgstr "権限を確認したいチャンネル。" - -#: discord.ClientUser.public_flags:1 discord.User.public_flags:1 -#: discord.WidgetMember.public_flags:1 of -msgid "The publicly available flags the user has." -msgstr "" - -#: discord.ClientUser.public_flags:3 discord.User.public_flags:3 -#: discord.WidgetMember.public_flags:3 of -#, fuzzy -msgid ":class:`PublicUserFlags`" -msgstr ":class:`bytes`" - -#: ../../api.rst:2597 -msgid "Relationship" -msgstr "" - -#: discord.Relationship:1 of -msgid "Represents a relationship in Discord." -msgstr "Discordのリレーションシップを表します。" - -#: discord.Relationship:3 of -msgid "" -"A relationship is like a friendship, a person who is blocked, etc. Only " -"non-bot accounts can have relationships." -msgstr "フレンドや、ブロックした人などのようなリレーションシップです。Botでないアカウントのみがリレーションシップを持つことが出来ます。" - -#: discord.Relationship:8 of -#, fuzzy -msgid "The user you have the relationship with." -msgstr "リレーションシップがあるか確認したいユーザーのID。" - -#: discord.Relationship:14 of -#, fuzzy -msgid "The type of relationship you have." -msgstr "以前のフレンドの状態。" - -#: discord.Relationship:16 of -#, fuzzy -msgid ":class:`RelationshipType`" -msgstr ":class:`.Invite`" - -#: discord.Relationship.delete:3 of -msgid "Deletes the relationship." -msgstr "" - -#: discord.Relationship.delete:5 of -msgid "Deleting the relationship failed." -msgstr "" - -#: discord.Relationship.accept:3 of -msgid "Accepts the relationship request. e.g. accepting a friend request." -msgstr "" - -#: discord.Relationship.accept:6 of -#, fuzzy -msgid "Accepting the relationship failed." -msgstr ":exc:`HTTPException` -- 設定の編集に失敗した。" - -#: ../../api.rst:2603 -msgid "User" -msgstr "" - -#: discord.User:1 of -msgid "Represents a Discord user." -msgstr "" - -#: discord.User:41 of -#, fuzzy -msgid "The avatar hash the user has. Could be None." -msgstr "Optional[:class:`str`] -- ユーザーのアバターハッシュ。 Noneが返る場合もあります。" - -#: discord.User.dm_channel:1 of -msgid "Returns the channel associated with this user if it exists." -msgstr "" - -#: discord.User.dm_channel:3 of -msgid "" -"If this returns ``None``, you can create a DM channel by calling the " -":meth:`create_dm` coroutine function." -msgstr "これが ``None``を返すなら、あなたは :meth:`create_dm` コルーチン関数を使って、DMチャンネルを作ることができます。" - -#: discord.User.dm_channel:6 of -msgid "Optional[:class:`DMChannel`]" -msgstr "" - -#: discord.Member.create_dm:1 discord.User.create_dm:1 of -msgid "Creates a :class:`DMChannel` with this user." -msgstr "このユーザーと :class:`DMChannel` を作ります。" - -#: discord.Member.create_dm:3 discord.User.create_dm:3 of -msgid "" -"This should be rarely called, as this is done transparently for most " -"people." -msgstr "" - -#: discord.Member.create_dm:7 discord.User.create_dm:7 of -#, fuzzy -msgid ":class:`.DMChannel`" -msgstr ":class:`.Widget`" - -#: discord.User.relationship:1 of -msgid "" -"Returns the :class:`Relationship` with this user if applicable, ``None`` " -"otherwise." -msgstr "" - -#: discord.Member.mutual_friends:3 discord.User.mutual_friends:3 of -msgid "Gets all mutual friends of this user." -msgstr "" - -#: discord.Member.mutual_friends:9 discord.User.mutual_friends:9 of -msgid "Not allowed to get mutual friends of this user." -msgstr "" - -#: discord.Member.mutual_friends:10 discord.User.mutual_friends:10 of -msgid "Getting mutual friends failed." -msgstr "" - -#: discord.Member.mutual_friends:12 discord.User.mutual_friends:12 of -msgid "The users that are mutual friends." -msgstr "" - -#: discord.Member.is_friend:1 discord.User.is_friend:1 of -#, fuzzy -msgid ":class:`bool`: Checks if the user is your friend." -msgstr ":class:`bool` -- ユーザーが認証済みアカウントであるかを表します。" - -#: discord.Member.is_blocked:1 discord.User.is_blocked:1 of -#, fuzzy -msgid ":class:`bool`: Checks if the user is blocked." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.Member.block:3 discord.User.block:3 of -msgid "Blocks the user." -msgstr "ユーザーをブロックします。" - -#: discord.Member.block:9 discord.User.block:9 of -#, fuzzy -msgid "Not allowed to block this user." -msgstr "このユーザーはブロックされています。" - -#: discord.Member.block:10 discord.User.block:10 of -#, fuzzy -msgid "Blocking the user failed." -msgstr "ユーザーをブロックします。" - -#: discord.Member.unblock:3 discord.User.unblock:3 of -msgid "Unblocks the user." -msgstr "" - -#: discord.Member.unblock:9 discord.User.unblock:9 of -#, fuzzy -msgid "Not allowed to unblock this user." -msgstr "このユーザーはブロックされています。" - -#: discord.Member.unblock:10 discord.User.unblock:10 of -#, fuzzy -msgid "Unblocking the user failed." -msgstr "ユーザーをブロックします。" - -#: discord.Member.remove_friend:3 discord.User.remove_friend:3 of -msgid "Removes the user as a friend." -msgstr "" - -#: discord.Member.remove_friend:9 discord.User.remove_friend:9 of -msgid "Not allowed to remove this user as a friend." -msgstr "" - -#: discord.Member.remove_friend:10 discord.User.remove_friend:10 of -msgid "Removing the user as a friend failed." -msgstr "" - -#: discord.Member.send_friend_request:3 discord.User.send_friend_request:3 of -msgid "Sends the user a friend request." -msgstr "" - -#: discord.Member.send_friend_request:9 discord.User.send_friend_request:9 of -msgid "Not allowed to send a friend request to the user." -msgstr "" - -#: discord.Member.send_friend_request:10 discord.User.send_friend_request:10 of -msgid "Sending the friend request failed." -msgstr "" - -#: discord.Member.profile:3 discord.User.profile:3 of -msgid "Gets the user's profile." -msgstr "" - -#: discord.Member.profile:13 discord.User.profile:13 of -msgid ":class:`Profile`" -msgstr "" - -#: ../../api.rst:2617 -msgid "Attachment" -msgstr "" - -#: discord.Attachment:1 of -msgid "Represents an attachment from Discord." -msgstr "" - -#: discord.Attachment:5 of -msgid "The attachment ID." -msgstr "" - -#: discord.Attachment:11 of -msgid "The attachment size in bytes." -msgstr "" - -#: discord.Attachment:17 of -msgid "The attachment's height, in pixels. Only applicable to images and videos." -msgstr "" - -#: discord.Attachment:23 of -msgid "The attachment's width, in pixels. Only applicable to images and videos." -msgstr "" - -#: discord.Attachment:29 of -msgid "The attachment's filename." -msgstr "" - -#: discord.Attachment:35 of -msgid "" -"The attachment URL. If the message this attachment was attached to is " -"deleted, then this will 404." -msgstr "" - -#: discord.Attachment:42 of -msgid "" -"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." -msgstr "" - -#: discord.Attachment.is_spoiler:1 of -msgid ":class:`bool`: Whether this attachment contains a spoiler." -msgstr "" - -#: discord.Attachment.save:3 of -msgid "Saves this attachment into a file-like object." -msgstr "" - -#: discord.Attachment.save:5 of -msgid "" -"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." -msgstr "" - -#: discord.Attachment.save:9 of -msgid "" -"Whether to seek to the beginning of the file after saving is successfully" -" done." -msgstr "" - -#: discord.Attachment.read:7 discord.Attachment.save:12 -#: discord.Attachment.to_file:8 of -msgid "" -"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." -msgstr "" - -#: discord.Attachment.save:20 of -msgid "Saving the attachment failed." -msgstr "" - -#: discord.Attachment.read:17 discord.Attachment.save:21 -#: discord.Attachment.to_file:24 of -#, fuzzy -msgid "The attachment was deleted." -msgstr "チャンネルの削除。" - -#: discord.Asset.save:14 discord.Attachment.save:23 of -msgid "The number of bytes written." -msgstr "" - -#: discord.Attachment.read:3 of -msgid "Retrieves the content of this attachment as a :class:`bytes` object." -msgstr "" - -#: discord.Attachment.read:15 discord.Attachment.to_file:22 of -msgid "Downloading the attachment failed." -msgstr "" - -#: discord.Attachment.read:16 discord.Attachment.to_file:23 of -#, fuzzy -msgid "You do not have permissions to access this attachment" -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.Attachment.read:19 of -msgid "The contents of the attachment." -msgstr "" - -#: discord.Attachment.to_file:3 of -msgid "" -"Converts the attachment into a :class:`File` suitable for sending via " -":meth:`abc.Messageable.send`." -msgstr "" - -#: discord.Attachment.to_file:8 of -msgid "" -"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. .. versionadded:: 1.4" -msgstr "" - -#: discord.Attachment.to_file:17 of -msgid "Whether the file is a spoiler. .. versionadded:: 1.4" -msgstr "" - -#: discord.Attachment.to_file:17 of -msgid "Whether the file is a spoiler." -msgstr "" - -#: discord.Attachment.to_file:26 of -msgid "The attachment as a file suitable for sending." -msgstr "" - -#: discord.Attachment.to_file:27 of -#, fuzzy -msgid ":class:`File`" -msgstr ":class:`.Profile`" - -#: ../../api.rst:2623 -msgid "Asset" -msgstr "" - -#: discord.Asset:1 of -msgid "Represents a CDN asset on Discord." -msgstr "" - -#: discord.Asset:7 of -msgid "Returns the URL of the CDN asset." -msgstr "" - -#: discord.Asset:11 of -msgid "Returns the length of the CDN asset's URL." -msgstr "" - -#: discord.Asset:15 of -msgid "Checks if the Asset has a URL." -msgstr "" - -#: discord.Asset:19 of -msgid "Checks if the asset is equal to another asset." -msgstr "" - -#: discord.Asset:23 of -msgid "Checks if the asset is not equal to another asset." -msgstr "" - -#: discord.Asset:27 of -msgid "Returns the hash of the asset." -msgstr "" - -#: discord.Asset.read:3 of -msgid "Retrieves the content of this asset as a :class:`bytes` object." -msgstr "" - -#: discord.Asset.read:7 of -msgid "" -":class:`PartialEmoji` won't have a connection state if user created, and " -"a URL won't be present if a custom image isn't associated with the asset," -" e.g. a guild with no custom icon." -msgstr "" - -#: discord.Asset.read:13 discord.Asset.save:10 of -msgid "There was no valid URL or internal connection state." -msgstr "" - -#: discord.Asset.read:14 discord.Asset.save:11 of -msgid "Downloading the asset failed." -msgstr "" - -#: discord.Asset.read:15 discord.Asset.save:12 of -#, fuzzy -msgid "The asset was deleted." -msgstr "役職の削除。" - -#: discord.Asset.read:17 of -msgid "The content of the asset." -msgstr "" - -#: discord.Asset.save:3 of -msgid "Saves this asset into a file-like object." -msgstr "" - -#: discord.Asset.save:5 discord.Asset.save:7 of -msgid "Same as in :meth:`Attachment.save`." -msgstr "" - -#: ../../api.rst:2629 -msgid "Message" -msgstr "" - -#: discord.Message:1 of -msgid "Represents a message from Discord." -msgstr "" - -#: discord.Message:3 of -msgid "There should be no need to create one of these manually." -msgstr "" - -#: discord.Message:7 of -msgid "" -"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." -msgstr "" - -#: discord.Message:15 of -msgid "" -"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`." -msgstr "" - -#: discord.Message:18 of -#, fuzzy -msgid ":class:`MessageType`" -msgstr ":class:`str`" - -#: discord.Message:22 of -msgid "" -"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." -msgstr "" - -#: discord.Message:29 of -#, fuzzy -msgid "The actual contents of the message." -msgstr "更新後のメッセージ。" - -#: discord.Message:35 of -msgid "" -"The value used by the discord guild and the client to verify that the " -"message is successfully sent. This is typically non-important." -msgstr "" - -#: discord.Message:40 of -#, fuzzy -msgid "A list of embeds the message has." -msgstr "更新前の絵文字のリスト。" - -#: discord.Message:42 of -#, fuzzy -msgid "List[:class:`Embed`]" -msgstr ":class:`bytes`" - -#: discord.Message:46 of -msgid "" -"The :class:`TextChannel` that the message was sent from. Could be a " -":class:`DMChannel` or :class:`GroupChannel` if it's a private message." -msgstr "" - -#: discord.Message:49 of -msgid "Union[:class:`abc.Messageable`]" -msgstr "" - -#: discord.Message:53 of -msgid "" -"The call that the message refers to. This is only applicable to messages " -"of type :attr:`MessageType.call`." -msgstr "" - -#: discord.Message:56 of -msgid "Optional[:class:`CallMessage`]" -msgstr "" - -#: discord.Message:60 of -msgid "" -"The message that this message references. This is only applicable to " -"messages of type :attr:`MessageType.pins_add` or crossposted messages " -"created by a followed channel integration." -msgstr "" - -#: discord.Message:66 of -msgid "Optional[:class:`MessageReference`]" -msgstr "" - -#: discord.Message:70 of -msgid "Specifies if the message mentions everyone." -msgstr "" - -#: discord.Message:74 of -msgid "" -"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." -msgstr "" - -#: discord.Message:82 of -msgid "" -"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`." -msgstr "" - -#: discord.Message:89 of -msgid "" -"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." -msgstr "" - -#: discord.Message:92 of -#, fuzzy -msgid "List[:class:`abc.User`]" -msgstr ":class:`str`" - -#: discord.Message:96 of -msgid "" -"A list of :class:`abc.GuildChannel` that were mentioned. If the message " -"is in a private message then the list is always empty." -msgstr "" - -#: discord.CategoryChannel.channels:5 discord.Guild.channels:3 -#: discord.Guild.fetch_channels:15 discord.Message:99 of -msgid "List[:class:`abc.GuildChannel`]" -msgstr "" - -#: discord.Message:103 of -msgid "" -"A list of :class:`Role` that were mentioned. If the message is in a " -"private message then the list is always empty." -msgstr "" - -#: discord.Emoji.roles:5 discord.Guild.edit_role_positions:32 -#: discord.Guild.fetch_roles:14 discord.Guild.roles:6 discord.Member.roles:7 -#: discord.Message:106 of -#, fuzzy -msgid "List[:class:`Role`]" -msgstr ":class:`.Profile`" - -#: discord.Message:110 of -#, fuzzy -msgid "The message ID." -msgstr "削除されたメッセージ。" - -#: discord.Message:116 of -msgid "" -"If this message was sent by a webhook, then this is the webhook ID's that" -" sent this message." -msgstr "" - -#: discord.Message:123 of -msgid "A list of attachments given to a message." -msgstr "" - -#: discord.Message:125 of -msgid "List[:class:`Attachment`]" -msgstr "" - -#: discord.Message:129 of -msgid "Specifies if the message is currently pinned." -msgstr "" - -#: discord.Message:135 of -#, fuzzy -msgid "Extra features of the message." -msgstr "更新後のメッセージ。" - -#: discord.Message:139 of -#, fuzzy -msgid ":class:`MessageFlags`" -msgstr ":class:`bytes`" - -#: discord.Message:143 of -msgid "" -"Reactions to a message. Reactions can be either custom emoji or standard " -"unicode emoji." -msgstr "" - -#: discord.Message:145 of -msgid "List[:class:`Reaction`]" -msgstr "" - -#: discord.Message:149 of -msgid "" -"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." -msgstr "" - -#: discord.Message:152 of -msgid "It is a dictionary with the following optional keys:" -msgstr "" - -#: discord.Message:154 of -msgid "" -"``type``: An integer denoting the type of message activity being " -"requested." -msgstr "" - -#: discord.Message:155 of -msgid "``party_id``: The party ID associated with the party." -msgstr "" - -#: discord.Message:157 discord.Message:171 of -msgid "Optional[:class:`dict`]" -msgstr "" - -#: discord.Message:161 of -msgid "The rich presence enabled application associated with this message." -msgstr "" - -#: discord.Message:163 of -msgid "It is a dictionary with the following keys:" -msgstr "" - -#: discord.Message:165 of -msgid "``id``: A string representing the application's ID." -msgstr "" - -#: discord.Message:166 of -msgid "``name``: A string representing the application's name." -msgstr "" - -#: discord.Message:167 of -msgid "``description``: A string representing the application's description." -msgstr "" - -#: discord.Message:168 of -msgid "``icon``: A string representing the icon ID of the application." -msgstr "" - -#: discord.Message:169 of -msgid "``cover_image``: A string representing the embed's image asset ID." -msgstr "" - -#: discord.Message.guild:1 of -msgid "The guild that the message belongs to, if applicable." -msgstr "" - -#: discord.Message.raw_mentions:1 of -msgid "" -"A property that returns an array of user IDs matched with the syntax of " -"``<@user_id>`` in the message content." -msgstr "" - -#: discord.Message.raw_mentions:4 of -msgid "" -"This allows you to receive the user IDs of mentioned users even in a " -"private message context." -msgstr "" - -#: discord.Message.raw_channel_mentions:4 discord.Message.raw_mentions:7 -#: discord.Message.raw_role_mentions:4 of -#, fuzzy -msgid "List[:class:`int`]" -msgstr ":class:`str`" - -#: discord.Message.raw_channel_mentions:1 of -msgid "" -"A property that returns an array of channel IDs matched with the syntax " -"of ``<#channel_id>`` in the message content." -msgstr "" - -#: discord.Message.raw_role_mentions:1 of -msgid "" -"A property that returns an array of role IDs matched with the syntax of " -"``<@&role_id>`` in the message content." -msgstr "" - -#: discord.Message.clean_content:1 of -msgid "" -"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``." -msgstr "" - -#: discord.Message.clean_content:6 of -msgid "This will also transform @everyone and @here mentions into non-mentions." -msgstr "" - -#: discord.Message.clean_content:11 of -msgid "" -"This *does not* escape markdown. If you want to escape markdown then use " -":func:`utils.escape_markdown` along with this function." -msgstr "" - -#: discord.Message.created_at:1 of -msgid "The message's creation time in UTC." -msgstr "" - -#: discord.Message.edited_at:1 of -msgid "A naive UTC datetime object containing the edited time of the message." -msgstr "" - -#: discord.Activity.end:3 discord.Activity.start:3 -#: discord.BaseActivity.created_at:5 discord.CallMessage:10 discord.Game.end:3 -#: discord.Game.start:3 discord.Member:30 discord.Member:55 -#: discord.Message.edited_at:3 discord.Spotify.created_at:5 of -msgid "Optional[:class:`datetime.datetime`]" -msgstr "" - -#: discord.Message.jump_url:1 of -msgid "Returns a URL that allows the client to jump to this message." -msgstr "" - -#: discord.Message.is_system:1 of -msgid ":class:`bool`: Whether the message is a system message." -msgstr "" - -#: discord.Message.system_content:1 of -msgid "" -"A property that returns the content that is rendered regardless of the " -":attr:`Message.type`." -msgstr "" - -#: discord.Message.system_content:4 of -msgid "" -"In the case of :attr:`MessageType.default`\\, this just returns the " -"regular :attr:`Message.content`. Otherwise this returns an English " -"message denoting the contents of the system message." -msgstr "" - -#: discord.Message.delete:3 of -msgid "Deletes the message." -msgstr "" - -#: discord.Message.delete:5 of -msgid "" -"Your own messages could be deleted without any proper permissions. " -"However to delete other people's messages, you need the " -":attr:`~Permissions.manage_messages` permission." -msgstr "" - -#: discord.Message.delete:9 of -msgid "Added the new ``delay`` keyword-only parameter." -msgstr "" - -#: discord.Message.delete:12 of -msgid "" -"If provided, the number of seconds to wait in the background before " -"deleting the message. If the deletion fails then it is silently ignored." -msgstr "" - -#: discord.Message.delete:16 of -msgid "You do not have proper permissions to delete the message." -msgstr "" - -#: discord.Message.delete:17 of -#, fuzzy -msgid "The message was deleted already" -msgstr "メッセージが埋め込みを受け取った。" - -#: discord.Message.delete:18 of -#, fuzzy -msgid "Deleting the message failed." -msgstr "削除されたメッセージ。" - -#: discord.Message.edit:3 of -msgid "Edits the message." -msgstr "" - -#: discord.Message.edit:5 of -msgid "" -"The content must be able to be transformed into a string via " -"``str(content)``." -msgstr "" - -#: discord.Message.edit:7 of -msgid "The ``suppress`` keyword-only parameter was added." -msgstr "" - -#: discord.Message.edit:10 of -msgid "" -"The new content to replace the message with. Could be ``None`` to remove " -"the content." -msgstr "" - -#: discord.Message.edit:13 of -msgid "" -"The new embed to replace the original with. Could be ``None`` to remove " -"the embed." -msgstr "" - -#: discord.Message.edit:16 of -msgid "" -"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`." -msgstr "" - -#: discord.Message.edit:21 of -msgid "" -"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." -msgstr "" - -#: discord.Message.edit:30 of -msgid "Editing the message failed." -msgstr "" - -#: discord.Message.edit:31 of -msgid "" -"Tried to suppress a message without permissions or edited a message's" -" content or embed that isn't yours." -msgstr "" - -#: discord.Message.publish:3 of -msgid "Publishes this message to your announcement channel." -msgstr "" - -#: discord.Message.publish:5 of -#, fuzzy -msgid "" -"If the message is not your own then the " -":attr:`~Permissions.manage_messages` permission is needed." -msgstr "これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` 権限が必要です。" - -#: discord.Message.publish:8 of -msgid "You do not have the proper permissions to publish this message." -msgstr "" - -#: discord.Message.publish:9 of -msgid "Publishing the message failed." -msgstr "" - -#: discord.Message.pin:3 of -msgid "Pins the message." -msgstr "" - -#: discord.Message.pin:5 discord.Message.unpin:5 of -msgid "" -"You must have the :attr:`~Permissions.manage_messages` permission to do " -"this in a non-private channel context." -msgstr "" - -#: discord.Message.pin:8 of -msgid "" -"The reason for pinning the message. Shows up on the audit log. .. " -"versionadded:: 1.4" -msgstr "" - -#: discord.Message.pin:8 of -msgid "The reason for pinning the message. Shows up on the audit log." -msgstr "" - -#: discord.Message.pin:13 of -#, fuzzy -msgid "You do not have permissions to pin the message." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.Message.pin:14 discord.Message.unpin:14 of -#, fuzzy -msgid "The message or channel was not found or deleted." -msgstr "作成、または削除されたギルドチャンネル。" - -#: discord.Message.pin:15 of -msgid "" -"Pinning the message failed, probably due to the channel having more " -"than 50 pinned messages." -msgstr "" - -#: discord.Message.unpin:3 of -msgid "Unpins the message." -msgstr "" - -#: discord.Message.unpin:8 of -msgid "" -"The reason for unpinning the message. Shows up on the audit log. .. " -"versionadded:: 1.4" -msgstr "" - -#: discord.Message.unpin:8 of -msgid "The reason for unpinning the message. Shows up on the audit log." -msgstr "" - -#: discord.Message.unpin:13 of -#, fuzzy -msgid "You do not have permissions to unpin the message." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.Message.unpin:15 of -msgid "Unpinning the message failed." -msgstr "" - -#: discord.Message.add_reaction:3 of -msgid "Add a reaction to the message." -msgstr "" - -#: discord.Message.add_reaction:5 discord.Message.clear_reaction:5 -#: discord.Message.remove_reaction:5 of -msgid "The emoji may be a unicode emoji or a custom guild :class:`Emoji`." -msgstr "" - -#: discord.Message.add_reaction:7 of -msgid "" -"You must have the :attr:`~Permissions.read_message_history` permission to" -" use this. If nobody else has reacted to the message using this emoji, " -"the :attr:`~Permissions.add_reactions` permission is required." -msgstr "" - -#: discord.Message.add_reaction:11 of -msgid "The emoji to react with." -msgstr "" - -#: discord.Message.add_reaction:14 of -msgid "Adding the reaction failed." -msgstr "" - -#: discord.Message.add_reaction:15 of -msgid "You do not have the proper permissions to react to the message." -msgstr "" - -#: discord.Message.add_reaction:16 discord.Message.clear_reaction:16 -#: discord.Reaction.clear:11 of -msgid "The emoji you specified was not found." -msgstr "" - -#: discord.Message.add_reaction:17 discord.Message.clear_reaction:17 -#: discord.Message.remove_reaction:21 discord.Reaction.clear:12 of -msgid "The emoji parameter is invalid." -msgstr "" - -#: discord.Message.remove_reaction:3 of -msgid "Remove a reaction by the member from the message." -msgstr "" - -#: discord.Message.remove_reaction:7 of -msgid "" -"If the reaction is not your own (i.e. ``member`` parameter is not you) " -"then the :attr:`~Permissions.manage_messages` permission is needed." -msgstr "" - -#: discord.Message.remove_reaction:10 of -msgid "" -"The ``member`` parameter must represent a member and meet the " -":class:`abc.Snowflake` abc." -msgstr "" - -#: discord.Message.remove_reaction:13 of -msgid "The emoji to remove." -msgstr "" - -#: discord.Message.remove_reaction:15 of -msgid "The member for which to remove the reaction." -msgstr "" - -#: discord.Message.remove_reaction:18 discord.Reaction.remove:14 of -msgid "Removing the reaction failed." -msgstr "" - -#: discord.Message.remove_reaction:19 discord.Reaction.remove:15 of -msgid "You do not have the proper permissions to remove the reaction." -msgstr "" - -#: discord.Message.remove_reaction:20 of -msgid "The member or emoji you specified was not found." -msgstr "" - -#: discord.Message.clear_reaction:3 of -#, fuzzy -msgid "Clears a specific reaction from the message." -msgstr "メッセージ送信者がサムズアップリアクションを付けるのを待つ場合: ::" - -#: discord.Message.clear_reaction:7 discord.Message.clear_reactions:5 -#: discord.Reaction.clear:5 of -msgid "You need the :attr:`~Permissions.manage_messages` permission to use this." -msgstr "" - -#: discord.Message.clear_reaction:11 of -msgid "The emoji to clear." -msgstr "" - -#: discord.Message.clear_reaction:14 discord.Reaction.clear:9 of -msgid "Clearing the reaction failed." -msgstr "" - -#: discord.Message.clear_reaction:15 discord.Reaction.clear:10 of -msgid "You do not have the proper permissions to clear the reaction." -msgstr "" - -#: discord.Message.clear_reactions:3 of -msgid "Removes all the reactions from the message." -msgstr "" - -#: discord.Message.clear_reactions:7 of -msgid "Removing the reactions failed." -msgstr "" - -#: discord.Message.clear_reactions:8 of -msgid "You do not have the proper permissions to remove all the reactions." -msgstr "" - -#: discord.Message.ack:3 of -msgid "Marks this message as read." -msgstr "" - -#: discord.Guild.ack:5 discord.Message.ack:5 of -msgid "The user must not be a bot user." -msgstr "" - -#: discord.Guild.ack:7 discord.Message.ack:7 of -msgid "Acking failed." -msgstr "" - -#: discord.Guild.ack:8 discord.Message.ack:8 of -msgid "You must not be a bot user." -msgstr "" - -#: ../../api.rst:2635 -msgid "Reaction" -msgstr "" - -#: discord.Reaction:1 of -msgid "Represents a reaction to a message." -msgstr "" - -#: discord.Emoji:3 discord.Invite:3 discord.Reaction:3 of -msgid "" -"Depending on the way this object was created, some of the attributes can " -"have a value of ``None``." -msgstr "" - -#: discord.Reaction:10 of -msgid "" -"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\"." -msgstr "" - -#: discord.Reaction:16 of -msgid "Checks if two reactions are not equal." -msgstr "" - -#: discord.Reaction:20 of -msgid "Returns the reaction's hash." -msgstr "" - -#: discord.Reaction:24 of -msgid "Returns the string form of the reaction's emoji." -msgstr "" - -#: discord.Reaction:28 of -msgid "The reaction emoji. May be a custom emoji, or a unicode emoji." -msgstr "" - -#: discord.Reaction:30 of -msgid "Union[:class:`Emoji`, :class:`PartialEmoji`, :class:`str`]" -msgstr "" - -#: discord.Reaction:34 of -msgid "Number of times this reaction was made" -msgstr "" - -#: discord.Reaction:40 of -#, fuzzy -msgid "If the user sent this reaction." -msgstr "リアクションを追加したユーザー。" - -#: discord.Reaction:46 of -#, fuzzy -msgid "Message this reaction is for." -msgstr "リアクションが削除されたメッセージ。" - -#: discord.CallMessage:22 discord.Intents.dm_messages:16 -#: discord.Intents.guild_messages:15 discord.Intents.messages:16 -#: discord.Reaction:48 of -#, fuzzy -msgid ":class:`Message`" -msgstr ":class:`bytes`" - -#: discord.Reaction.users:1 of -msgid "" -"Returns an :class:`AsyncIterator` representing the users that have " -"reacted to the message." -msgstr "" - -#: discord.Reaction.users:3 of -msgid "" -"The ``after`` parameter must represent a member and meet the " -":class:`abc.Snowflake` abc." -msgstr "" - -#: discord.Reaction.users:21 of -msgid "" -"The maximum number of results to return. If not provided, returns all the" -" users who reacted to the message." -msgstr "" - -#: discord.Reaction.users:25 of -msgid "For pagination, reactions are sorted by member." -msgstr "" - -#: discord.Reaction.users:28 of -#, fuzzy -msgid "Getting the users for the reaction failed." -msgstr "リアクションを追加したユーザー。" - -#: discord.Reaction.users:30 of -msgid "" -"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." -msgstr "" - -#: discord.Reaction.custom_emoji:1 of -msgid "If this is a custom emoji." -msgstr "" - -#: discord.Reaction.remove:3 of -msgid "Remove the reaction by the provided :class:`User` from the message." -msgstr "" - -#: discord.Reaction.remove:5 of -msgid "" -"If the reaction is not your own (i.e. ``user`` parameter is not you) then" -" the :attr:`~Permissions.manage_messages` permission is needed." -msgstr "" - -#: discord.Reaction.remove:8 of -msgid "" -"The ``user`` parameter must represent a user or member and meet the " -":class:`abc.Snowflake` abc." -msgstr "" - -#: discord.Reaction.remove:11 of -msgid "The user or member from which to remove the reaction." -msgstr "" - -#: discord.Reaction.remove:16 of -msgid "The user you specified, or the reaction's message was not found." -msgstr "" - -#: discord.Reaction.clear:3 of -#, fuzzy -msgid "Clears this reaction from the message." -msgstr "メッセージ送信者がサムズアップリアクションを付けるのを待つ場合: ::" - -#: ../../api.rst:2645 -msgid "CallMessage" -msgstr "" - -#: discord.CallMessage:1 of -msgid "Represents a group call message from Discord." -msgstr "" - -#: discord.CallMessage:3 of -msgid "" -"This is only received in cases where the message type is equivalent to " -":attr:`MessageType.call`." -msgstr "" - -#: discord.CallMessage:8 of -msgid "" -"A naive UTC datetime object that represents the time that the call has " -"ended." -msgstr "" - -#: discord.CallMessage:14 of -msgid "The list of users that are participating in this call." -msgstr "" - -#: discord.CallMessage:20 of -msgid "The message associated with this call message." -msgstr "" - -#: discord.CallMessage.call_ended:1 of -#, fuzzy -msgid "Indicates if the call has ended." -msgstr "opusライブラリがロードされているかを表します。" - -#: discord.CallMessage.channel:1 of -#, fuzzy -msgid "The private channel associated with this message." -msgstr "プライベートのテキストチャンネル。ダイレクトメッセージとも呼ばれています。" - -#: discord.CallMessage.channel:3 discord.GroupCall.channel:3 of -#, fuzzy -msgid ":class:`GroupChannel`" -msgstr ":class:`bool`" - -#: discord.CallMessage.duration:1 of -msgid "Queries the duration of the call." -msgstr "" - -#: discord.CallMessage.duration:3 of -msgid "If the call has not ended then the current duration will be returned." -msgstr "" - -#: discord.CallMessage.duration:6 of -msgid "The timedelta object representing the duration." -msgstr "" - -#: discord.CallMessage.duration:7 discord.Spotify.duration:3 of -msgid ":class:`datetime.timedelta`" -msgstr "" - -#: ../../api.rst:2651 -msgid "GroupCall" -msgstr "" - -#: discord.GroupCall:1 of -msgid "Represents the actual group call from Discord." -msgstr "" - -#: discord.GroupCall:3 of -msgid "This is accompanied with a :class:`CallMessage` denoting the information." -msgstr "" - -#: discord.GroupCall:7 of -msgid "The call message associated with this group call." -msgstr "" - -#: discord.GroupCall:9 of -#, fuzzy -msgid ":class:`CallMessage`" -msgstr ":class:`bytes`" - -#: discord.GroupCall:13 of -msgid "Denotes if this group call is unavailable." -msgstr "" - -#: discord.GroupCall:19 of -msgid "A list of users that are currently being rung to join the call." -msgstr "" - -#: discord.GroupCall:25 of -#, fuzzy -msgid "The guild region the group call is being hosted on." -msgstr "更新される前のギルド。" - -#: discord.GroupCall.connected:1 of -msgid "A property that returns all users that are currently in this call." -msgstr "" - -#: discord.GroupCall.channel:1 of -#, fuzzy -msgid "Returns the channel the group call is in." -msgstr "カテゴリの名前を返します。" - -#: discord.GroupCall.voice_state_for:1 of -msgid "Retrieves the :class:`VoiceState` for a specified :class:`User`." -msgstr "" - -#: discord.GroupCall.voice_state_for:3 of -msgid "" -"If the :class:`User` has no voice state then this function returns " -"``None``." -msgstr "" - -#: discord.GroupCall.voice_state_for:6 of -msgid "The user to retrieve the voice state for." -msgstr "" - -#: discord.GroupCall.voice_state_for:9 of -msgid "The voice state associated with this user." -msgstr "" - -#: discord.GroupCall.voice_state_for:10 discord.Member.voice:3 of -msgid "Optional[:class:`VoiceState`]" -msgstr "" - -#: ../../api.rst:2657 -msgid "Guild" -msgstr "" - -#: discord.Guild:1 of -msgid "Represents a Discord guild." -msgstr "" - -#: discord.Guild:3 of -msgid "This is referred to as a \"server\" in the official Discord UI." -msgstr "" - -#: discord.Guild:9 of -msgid "Checks if two guilds are equal." -msgstr "" - -#: discord.Guild:13 of -msgid "Checks if two guilds are not equal." -msgstr "" - -#: discord.Guild:17 of -msgid "Returns the guild's hash." -msgstr "" - -#: discord.Guild:21 of -msgid "Returns the guild's name." -msgstr "" - -#: discord.Guild:25 of -#, fuzzy -msgid "The guild name." -msgstr "IDから取得したギルド。" - -#: discord.Guild:31 of -msgid "All emojis that the guild owns." -msgstr "" - -#: discord.Guild:33 of -msgid "Tuple[:class:`Emoji`, ...]" -msgstr "" - -#: discord.Guild:37 of -msgid "" -"The region the guild belongs on. There is a chance that the region will " -"be a :class:`str` if the value is not recognised by the enumerator." -msgstr "" - -#: discord.Guild:44 of -msgid "The timeout to get sent to the AFK channel." -msgstr "" - -#: discord.Guild:50 of -msgid "The channel that denotes the AFK channel. ``None`` if it doesn't exist." -msgstr "" - -#: discord.Guild:52 discord.VoiceState:52 discord.WidgetMember:91 of -msgid "Optional[:class:`VoiceChannel`]" -msgstr "" - -#: discord.Guild:56 of -#, fuzzy -msgid "The guild's icon." -msgstr "ギルドのウィジェット。" - -#: discord.Guild:62 discord.Widget:19 of -#, fuzzy -msgid "The guild's ID." -msgstr "ギルドのウィジェット。" - -#: discord.Guild:68 of -msgid "The guild owner's ID. Use :attr:`Guild.owner` instead." -msgstr "" - -#: discord.Guild:74 of -msgid "" -"Indicates if the guild is unavailable. If this is ``True`` then the " -"reliability of other attributes outside of :meth:`Guild.id` is slim and " -"they might all be ``None``. It is best to not do anything with the guild " -"if it is unavailable." -msgstr "" - -#: discord.Guild:78 of -msgid "" -"Check the :func:`on_guild_unavailable` and :func:`on_guild_available` " -"events." -msgstr "" - -#: discord.Guild:84 of -msgid "The maximum amount of presences for the guild." -msgstr "" - -#: discord.Guild:90 of -msgid "The maximum amount of members for the guild." -msgstr "" - -#: discord.Guild:94 of -msgid "This attribute is only available via :meth:`.Client.fetch_guild`." -msgstr "" - -#: discord.Guild:100 of -msgid "The maximum amount of users in a video channel." -msgstr "" - -#: discord.Guild:108 of -#, fuzzy -msgid "The guild's banner." -msgstr "ギルドのウィジェット。" - -#: discord.Guild:114 of -#, fuzzy -msgid "The guild's description." -msgstr "ギルドのウィジェット。" - -#: discord.Guild:120 of -msgid "" -"Indicates the guild's two factor authorisation level. If this value is 0 " -"then the guild does not require 2FA for their administrative members. If " -"the value is 1 then they do." -msgstr "" - -#: discord.Guild:134 of -#, fuzzy -msgid "The guild's explicit content filter." -msgstr "ギルドで表現のフィルターが有効ではない。" - -#: discord.Guild:140 of -#, fuzzy -msgid "The guild's notification settings." -msgstr "ギルドの管理設定の変更" - -#: discord.Guild:146 of -msgid "A list of features that the guild has. They are currently as follows:" -msgstr "" - -#: discord.Guild:148 of -msgid "``VIP_REGIONS``: Guild has VIP voice regions" -msgstr "" - -#: discord.Guild:149 of -msgid "" -"``VANITY_URL``: Guild can have a vanity invite URL (e.g. discord.gg" -"/discord-api)" -msgstr "" - -#: discord.Guild:150 of -msgid "``INVITE_SPLASH``: Guild's invite page can have a special splash." -msgstr "" - -#: discord.Guild:151 of -msgid "``VERIFIED``: Guild is a verified server." -msgstr "" - -#: discord.Guild:152 of -msgid "``PARTNERED``: Guild is a partnered server." -msgstr "" - -#: discord.Guild:153 of -msgid "``MORE_EMOJI``: Guild is allowed to have more than 50 custom emoji." -msgstr "" - -#: discord.Guild:154 of -msgid "``DISCOVERABLE``: Guild shows up in Server Discovery." -msgstr "" - -#: discord.Guild:155 of -msgid "``FEATURABLE``: Guild is able to be featured in Server Discovery." -msgstr "" - -#: discord.Guild:156 of -msgid "``COMMUNITY``: Guild is a community server." -msgstr "" - -#: discord.Guild:157 of -msgid "``COMMERCE``: Guild can sell things using store channels." -msgstr "" - -#: discord.Guild:158 of -msgid "``PUBLIC``: Guild is a public guild." -msgstr "" - -#: discord.Guild:159 of -msgid "``NEWS``: Guild can create news channels." -msgstr "" - -#: discord.Guild:160 of -msgid "``BANNER``: Guild can upload and use a banner (i.e. :meth:`banner_url`)." -msgstr "" - -#: discord.Guild:161 of -msgid "``ANIMATED_ICON``: Guild can upload an animated icon." -msgstr "" - -#: discord.Guild:162 of -msgid "``PUBLIC_DISABLED``: Guild cannot be public." -msgstr "" - -#: discord.Guild:163 of -msgid "``WELCOME_SCREEN_ENABLED``: Guild has enabled the welcome screen" -msgstr "" - -#: discord.Guild:165 discord.PartialInviteGuild:46 discord.Spotify.artists:3 of -#, fuzzy -msgid "List[:class:`str`]" -msgstr ":class:`str`" - -#: discord.Guild:169 of -#, fuzzy -msgid "The guild's invite splash." -msgstr "ギルドの招待時のスプラッシュ画像の変更" - -#: discord.Guild:175 of -msgid "" -"The premium tier for this guild. Corresponds to \"Nitro Server\" in the " -"official UI. The number goes from 0 to 3 inclusive." -msgstr "" - -#: discord.Guild:182 of -msgid "The number of \"boosts\" this guild currently has." -msgstr "" - -#: discord.Guild:188 of -msgid "" -"The preferred locale for the guild. Used when filtering Server Discovery " -"results to a specific language." -msgstr "" - -#: discord.Guild:195 of -#, fuzzy -msgid "The guild's discovery splash." -msgstr "ギルドの招待時のスプラッシュ画像の変更" - -#: discord.Guild.audit_logs:1 of -msgid "" -"Returns an :class:`AsyncIterator` that enables receiving the guild's " -"audit logs." -msgstr "" - -#: discord.Guild.audit_logs:3 of -msgid "" -"You must have the :attr:`~Permissions.view_audit_log` permission to use " -"this." -msgstr "" - -#: discord.Guild.audit_logs:7 of -msgid "Getting the first 100 entries: ::" -msgstr "" - -#: discord.Guild.audit_logs:12 of -msgid "Getting entries for a specific action: ::" -msgstr "" - -#: discord.Guild.audit_logs:17 of -msgid "Getting entries made by a specific user: ::" -msgstr "" - -#: discord.Guild.audit_logs:22 of -msgid "The number of entries to retrieve. If ``None`` retrieve all entries." -msgstr "" - -#: discord.Guild.audit_logs:24 of -msgid "" -"Retrieve entries before this date or entry. If a date is provided it must" -" be a timezone-naive datetime representing UTC time." -msgstr "" - -#: discord.Guild.audit_logs:27 of -msgid "" -"Retrieve entries after this date or entry. If a date is provided it must " -"be a timezone-naive datetime representing UTC time." -msgstr "" - -#: discord.Guild.audit_logs:30 of -msgid "" -"If set to ``True``, return entries in oldest->newest order. Defaults to " -"``True`` if ``after`` is specified, otherwise ``False``." -msgstr "" - -#: discord.Guild.audit_logs:33 of -msgid "The moderator to filter entries from." -msgstr "" - -#: discord.Guild.audit_logs:35 of -msgid "The action to filter with." -msgstr "" - -#: discord.Guild.audit_logs:38 of -msgid "You are not allowed to fetch audit logs" -msgstr "" - -#: discord.Guild.audit_logs:39 of -msgid "An error occurred while fetching the audit logs." -msgstr "" - -#: discord.Guild.audit_logs:41 of -msgid ":class:`AuditLogEntry` -- The audit log entry." -msgstr "" - -#: discord.Guild.channels:1 of -msgid "A list of channels that belongs to this guild." -msgstr "" - -#: discord.Guild.large:1 of -msgid "Indicates if the guild is a 'large' guild." -msgstr "" - -#: discord.Guild.large:3 of -msgid "" -"A large guild is defined as having more than ``large_threshold`` count " -"members, which for this library is set to the maximum of 250." -msgstr "" - -#: discord.Guild.voice_channels:1 of -msgid "A list of voice channels that belongs to this guild." -msgstr "" - -#: discord.Guild.categories:3 discord.Guild.text_channels:3 -#: discord.Guild.voice_channels:3 of -msgid "This is sorted by the position and are in UI order from top to bottom." -msgstr "" - -#: discord.CategoryChannel.voice_channels:3 discord.Guild.voice_channels:5 of -msgid "List[:class:`VoiceChannel`]" -msgstr "" - -#: discord.Guild.me:1 of -msgid "" -"Similar to :attr:`Client.user` except an instance of :class:`Member`. " -"This is essentially used to get the member version of yourself." -msgstr "" - -#: discord.Guild.fetch_member:16 discord.Guild.me:4 of -msgid ":class:`Member`" -msgstr "" - -#: discord.Guild.voice_client:1 of -msgid "Returns the :class:`VoiceProtocol` associated with this guild, if any." -msgstr "" - -#: discord.Guild.voice_client:3 of -msgid "Optional[:class:`VoiceProtocol`]" -msgstr "" - -#: discord.Guild.text_channels:1 of -msgid "A list of text channels that belongs to this guild." -msgstr "" - -#: discord.CategoryChannel.text_channels:3 discord.Guild.text_channels:5 of -msgid "List[:class:`TextChannel`]" -msgstr "" - -#: discord.Guild.categories:1 of -msgid "A list of categories that belongs to this guild." -msgstr "" - -#: discord.Guild.categories:5 of -msgid "List[:class:`CategoryChannel`]" -msgstr "" - -#: discord.Guild.by_category:1 of -msgid "Returns every :class:`CategoryChannel` and their associated channels." -msgstr "" - -#: discord.Guild.by_category:3 of -msgid "These channels and categories are sorted in the official Discord UI order." -msgstr "" - -#: discord.Guild.by_category:5 of -msgid "" -"If the channels do not have a category, then the first element of the " -"tuple is ``None``." -msgstr "" - -#: discord.Guild.by_category:8 of -msgid "The categories and their associated channels." -msgstr "" - -#: discord.Guild.by_category:9 of -msgid "" -"List[Tuple[Optional[:class:`CategoryChannel`], " -"List[:class:`abc.GuildChannel`]]]" -msgstr "" - -#: discord.Guild.get_channel:7 of -#, fuzzy -msgid "Optional[:class:`.abc.GuildChannel`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: discord.Guild.system_channel:1 of -msgid "Returns the guild's channel used for system messages." -msgstr "" - -#: discord.Guild.public_updates_channel:5 discord.Guild.rules_channel:4 -#: discord.Guild.system_channel:3 of -msgid "If no channel is set, then this returns ``None``." -msgstr "" - -#: discord.Guild.system_channel_flags:1 of -msgid "Returns the guild's system channel settings." -msgstr "" - -#: discord.Guild.system_channel_flags:3 of -#, fuzzy -msgid ":class:`SystemChannelFlags`" -msgstr ":class:`bytes`" - -#: discord.Guild.rules_channel:1 of -msgid "" -"Return's the guild's channel used for the rules. Must be a discoverable " -"guild." -msgstr "" - -#: discord.Guild.public_updates_channel:1 of -msgid "" -"Return's the guild's channel where admins and moderators of the guilds " -"receive notices from Discord. This is only available to guilds that " -"contain ``PUBLIC`` in :attr:`Guild.features`." -msgstr "" - -#: discord.Guild.emoji_limit:1 of -msgid "The maximum number of emoji slots this guild has." -msgstr "" - -#: discord.Guild.bitrate_limit:1 of -msgid "The maximum bitrate for voice channels this guild can have." -msgstr "" - -#: discord.Guild.filesize_limit:1 of -msgid "The maximum number of bytes files can have when uploaded to this guild." -msgstr "" - -#: discord.Guild.members:1 of -msgid "A list of members that belong to this guild." -msgstr "" - -#: discord.Guild.members:3 discord.Guild.premium_subscribers:3 -#: discord.Guild.query_members:27 discord.Role.members:3 -#: discord.TextChannel.members:3 discord.VoiceChannel.members:3 of -#, fuzzy -msgid "List[:class:`Member`]" -msgstr ":class:`bytes`" - -#: discord.Guild.get_member:1 of -msgid "Returns a member with the given ID." -msgstr "" - -#: discord.Guild.get_member:6 of -msgid "The member or ``None`` if not found." -msgstr "" - -#: discord.Guild.get_member:7 discord.Guild.get_member_named:20 -#: discord.Guild.owner:3 discord.RawReactionActionEvent:40 of -msgid "Optional[:class:`Member`]" -msgstr "" - -#: discord.Guild.premium_subscribers:1 of -msgid "A list of members who have \"boosted\" this guild." -msgstr "" - -#: discord.Guild.roles:1 of -msgid "Returns a :class:`list` of the guild's roles in hierarchy order." -msgstr "" - -#: discord.Guild.roles:3 of -msgid "The first element of this list will be the lowest role in the hierarchy." -msgstr "" - -#: discord.Guild.get_role:1 of -msgid "Returns a role with the given ID." -msgstr "" - -#: discord.Guild.get_role:6 of -msgid "The role or ``None`` if not found." -msgstr "" - -#: discord.Guild.get_role:7 of -#, fuzzy -msgid "Optional[:class:`Role`]" -msgstr ":class:`.Profile`" - -#: discord.Guild.default_role:1 of -msgid "Gets the @everyone role that all members have by default." -msgstr "" - -#: discord.Guild.create_role:31 discord.Guild.default_role:3 -#: discord.Integration:45 discord.Member.top_role:6 of -msgid ":class:`Role`" -msgstr "" - -#: discord.Guild.owner:1 of -#, fuzzy -msgid "The member that owns the guild." -msgstr "ギルドの名前。" - -#: discord.Guild.icon_url:1 discord.PartialInviteGuild.icon_url:1 of -#, fuzzy -msgid "Returns the guild's icon asset." -msgstr "役職の名前を返します。" - -#: discord.Guild.is_icon_animated:1 of -msgid ":class:`bool`: Returns True if the guild has an animated icon." -msgstr "" - -#: discord.Guild.icon_url_as:1 of -msgid "Returns an :class:`Asset` for the guild's icon." -msgstr "" - -#: discord.Guild.icon_url_as:7 of -msgid "" -"The format to attempt to convert the icon to. If the format is ``None``, " -"then it is automatically detected into either 'gif' or static_format " -"depending on the icon being animated or not." -msgstr "" - -#: discord.Guild.icon_url_as:12 of -msgid "Format to attempt to convert only non-animated icons to." -msgstr "" - -#: discord.Guild.banner_url:1 discord.PartialInviteGuild.banner_url:1 of -#, fuzzy -msgid "Returns the guild's banner asset." -msgstr "役職の名前を返します。" - -#: discord.Guild.banner_url_as:1 of -msgid "Returns an :class:`Asset` for the guild's banner." -msgstr "" - -#: discord.Guild.banner_url_as:3 of -msgid "" -"The format must be one of 'webp', 'jpeg', or 'png'. The size must be a " -"power of 2 between 16 and 4096." -msgstr "" - -#: discord.Guild.banner_url_as:6 of -msgid "The format to attempt to convert the banner to." -msgstr "" - -#: discord.Guild.splash_url:1 discord.PartialInviteGuild.splash_url:1 of -#, fuzzy -msgid "Returns the guild's invite splash asset." -msgstr "ギルドの招待時のスプラッシュ画像の変更" - -#: discord.Guild.splash_url_as:1 of -msgid "Returns an :class:`Asset` for the guild's invite splash." -msgstr "" - -#: discord.Guild.discovery_splash_url_as:3 discord.Guild.splash_url_as:3 of -msgid "" -"The format must be one of 'webp', 'jpeg', 'jpg', or 'png'. The size must " -"be a power of 2 between 16 and 4096." -msgstr "" - -#: discord.Guild.discovery_splash_url_as:8 discord.Guild.splash_url_as:6 of -msgid "The format to attempt to convert the splash to." -msgstr "" - -#: discord.Guild.discovery_splash_url:1 of -msgid "Returns the guild's discovery splash asset." -msgstr "" - -#: discord.Guild.discovery_splash_url_as:1 of -msgid "Returns an :class:`Asset` for the guild's discovery splash." -msgstr "" - -#: discord.Guild.member_count:1 of -msgid "Returns the true member count regardless of it being loaded fully or not." -msgstr "" - -#: discord.Guild.member_count:5 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.chunked:1 of -msgid "Returns a boolean indicating if the guild is \"chunked\"." -msgstr "" - -#: discord.Guild.chunked:3 of -msgid "" -"A chunked guild means that :attr:`member_count` is equal to the number of" -" members stored in the internal :attr:`members` cache." -msgstr "" - -#: discord.Guild.chunked:6 of -msgid "" -"If this value returns ``False``, then you should request for offline " -"members." -msgstr "" - -#: discord.Guild.shard_id:1 of -#, fuzzy -msgid "Returns the shard ID for this guild if applicable." -msgstr ":exc:`.Forbidden` -- ギルドのウィジェットが有効化されていない。" - -#: discord.Guild.created_at:1 discord.PartialInviteGuild.created_at:1 of -msgid "Returns the guild's creation time in UTC." -msgstr "" - -#: discord.Guild.get_member_named:1 of -msgid "Returns the first member found that matches the name provided." -msgstr "" - -#: discord.Guild.get_member_named:3 of -msgid "" -"The name can have an optional discriminator argument, e.g. \"Jake#0001\" " -"or \"Jake\" will both do the lookup. However the former will give a more " -"precise result. Note that the discriminator must have all 4 digits for " -"this to work." -msgstr "" - -#: discord.Guild.get_member_named:8 of -msgid "" -"If a nickname is passed, then it is looked up via the nickname. Note " -"however, that a nickname + discriminator combo will not lookup the " -"nickname but rather the username + discriminator combo due to nickname + " -"discriminator not being unique." -msgstr "" - -#: discord.Guild.get_member_named:13 of -msgid "If no member is found, ``None`` is returned." -msgstr "" - -#: discord.Guild.get_member_named:15 of -msgid "The name of the member to lookup with an optional discriminator." -msgstr "" - -#: discord.Guild.get_member_named:18 of -msgid "" -"The member in this guild with the associated name. If not found then " -"``None`` is returned." -msgstr "" - -#: discord.Guild.create_text_channel:3 of -msgid "Creates a :class:`TextChannel` for the guild." -msgstr "" - -#: discord.Guild.create_text_channel:5 of -msgid "" -"Note that you need the :attr:`~Permissions.manage_channels` permission to" -" create the channel." -msgstr "" - -#: discord.Guild.create_text_channel:8 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.create_text_channel:15 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.create_text_channel:21 of -msgid "Creating a basic channel:" -msgstr "" - -#: discord.Guild.create_text_channel:27 of -msgid "Creating a \"secret\" channel:" -msgstr "" - -#: discord.Guild.create_text_channel:38 discord.WidgetChannel:29 of -msgid "The channel's name." -msgstr "" - -#: discord.Guild.create_text_channel:40 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.create_text_channel:43 of -msgid "" -"The category to place the newly created channel under. The permissions " -"will be automatically synced to category if no overwrites are provided." -msgstr "" - -#: discord.Guild.create_text_channel:50 discord.TextChannel.edit:16 of -msgid "The new channel's topic." -msgstr "" - -#: discord.Guild.create_text_channel:52 of -msgid "" -"Specifies the slowmode rate limit for user in this channel, in seconds. " -"The maximum value possible is `21600`." -msgstr "" - -#: discord.Guild.create_text_channel:55 discord.TextChannel.edit:20 of -msgid "To mark the channel as NSFW or not." -msgstr "" - -#: discord.Guild.create_text_channel:57 of -msgid "The reason for creating this channel. Shows up on the audit log." -msgstr "" - -#: discord.Guild.create_category:12 discord.Guild.create_category_channel:12 -#: discord.Guild.create_text_channel:62 discord.Guild.create_voice_channel:13 -#: of -msgid "The permission overwrite information is not in proper form." -msgstr "" - -#: discord.CategoryChannel.create_text_channel:5 -#: discord.CategoryChannel.create_voice_channel:5 -#: discord.Guild.create_category:14 discord.Guild.create_category_channel:14 -#: discord.Guild.create_text_channel:64 discord.Guild.create_voice_channel:15 -#: of -msgid "The channel that was just created." -msgstr "" - -#: discord.CategoryChannel.create_text_channel:6 -#: discord.Guild.create_text_channel:65 of -msgid ":class:`TextChannel`" -msgstr "" - -#: discord.Guild.create_voice_channel:3 of -msgid "" -"This is similar to :meth:`create_text_channel` except makes a " -":class:`VoiceChannel` instead, in addition to having the following new " -"parameters." -msgstr "" - -#: discord.Guild.create_voice_channel:6 discord.VoiceChannel:54 of -msgid "The channel's preferred audio bitrate in bits per second." -msgstr "" - -#: discord.Guild.create_voice_channel:8 discord.VoiceChannel:60 of -msgid "The channel's limit for number of members that can be in a voice channel." -msgstr "" - -#: discord.CategoryChannel.create_voice_channel:6 -#: discord.Guild.create_voice_channel:16 of -#, fuzzy -msgid ":class:`VoiceChannel`" -msgstr "ボイスチャンネル。" - -#: discord.Guild.create_category:3 discord.Guild.create_category_channel:3 of -msgid "" -"Same as :meth:`create_text_channel` except makes a " -":class:`CategoryChannel` instead." -msgstr "" - -#: discord.Guild.create_category:7 discord.Guild.create_category_channel:7 of -msgid "" -"The ``category`` parameter is not supported in this function since " -"categories cannot have categories." -msgstr "" - -#: discord.Guild.create_category:15 discord.Guild.create_category_channel:15 of -#, fuzzy -msgid ":class:`CategoryChannel`" -msgstr ":class:`str`" - -#: discord.Guild.leave:3 of -msgid "Leaves the guild." -msgstr "" - -#: discord.Guild.leave:7 of -msgid "" -"You cannot leave the guild that you own, you must delete it instead via " -":meth:`delete`." -msgstr "" - -#: discord.Guild.leave:10 of -#, fuzzy -msgid "Leaving the guild failed." -msgstr "ギルドのアイコンの変更" - -#: discord.Guild.delete:3 of -msgid "Deletes the guild. You must be the guild owner to delete the guild." -msgstr "" - -#: discord.Guild.delete:6 of -#, fuzzy -msgid "Deleting the guild failed." -msgstr ":exc:`.HTTPException` -- ギルドの取得に失敗した。" - -#: discord.Guild.delete:7 of -#, fuzzy -msgid "You do not have permissions to delete the guild." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.Guild.edit:3 of -msgid "Edits the guild." -msgstr "" - -#: discord.Guild.edit:5 of -msgid "" -"You must have the :attr:`~Permissions.manage_guild` permission to edit " -"the guild." -msgstr "" - -#: discord.Guild.edit:8 of -msgid "" -"The `rules_channel` and `public_updates_channel` keyword-only parameters " -"were added." -msgstr "" - -#: discord.Guild.edit:11 of -msgid "The new name of the guild." -msgstr "" - -#: discord.Guild.edit:13 of -msgid "" -"The new description of the guild. This is only available to guilds that " -"contain ``PUBLIC`` in :attr:`Guild.features`." -msgstr "" - -#: discord.Guild.edit:16 of -msgid "" -"A :term:`py:bytes-like object` representing the icon. Only PNG/JPEG " -"supported and GIF This is only available to guilds that contain " -"``ANIMATED_ICON`` in :attr:`Guild.features`. Could be ``None`` to denote " -"removal of the icon." -msgstr "" - -#: discord.Guild.edit:20 of -msgid "" -"A :term:`py:bytes-like object` representing the banner. Could be ``None``" -" to denote removal of the banner." -msgstr "" - -#: discord.Guild.edit:23 of -msgid "" -"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`." -msgstr "" - -#: discord.Guild.edit:28 of -msgid "The new region for the guild's voice communication." -msgstr "" - -#: discord.Guild.edit:30 of -msgid "" -"The new channel that is the AFK channel. Could be ``None`` for no AFK " -"channel." -msgstr "" - -#: discord.Guild.edit:32 of -msgid "The number of seconds until someone is moved to the AFK channel." -msgstr "" - -#: discord.Guild.edit:34 of -msgid "" -"The new owner of the guild to transfer ownership to. Note that you must " -"be owner of the guild to do this." -msgstr "" - -#: discord.Guild.edit:37 of -msgid "The new verification level for the guild." -msgstr "" - -#: discord.Guild.edit:39 of -msgid "The new default notification level for the guild." -msgstr "" - -#: discord.Guild.edit:41 of -msgid "The new explicit content filter for the guild." -msgstr "" - -#: discord.Guild.edit:43 of -msgid "The new vanity code for the guild." -msgstr "" - -#: discord.Guild.edit:45 of -msgid "" -"The new channel that is used for the system channel. Could be ``None`` " -"for no system channel." -msgstr "" - -#: discord.Guild.edit:47 of -msgid "The new system channel settings to use with the new system channel." -msgstr "" - -#: discord.Guild.edit:49 of -msgid "" -"The new channel that is used for rules. This is only available to guilds " -"that contain ``PUBLIC`` in :attr:`Guild.features`. Could be ``None`` for " -"no rules channel." -msgstr "" - -#: discord.Guild.edit:53 of -msgid "" -"The new channel that is used for public updates from Discord. This is " -"only available to guilds that contain ``PUBLIC`` in " -":attr:`Guild.features`. Could be ``None`` for no public updates channel." -msgstr "" - -#: discord.Guild.edit:57 of -msgid "The reason for editing this guild. Shows up on the audit log." -msgstr "" - -#: discord.Guild.edit:60 of -#, fuzzy -msgid "You do not have permissions to edit the guild." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.Guild.edit:61 discord.Integration.edit:16 of -#, fuzzy -msgid "Editing the guild failed." -msgstr ":exc:`.HTTPException` -- ギルドの取得に失敗した。" - -#: discord.Guild.edit:62 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.fetch_channels:3 of -msgid "Retrieves all :class:`abc.GuildChannel` that the guild has." -msgstr "" - -#: discord.Guild.fetch_channels:7 of -msgid "" -"This method is an API call. For general usage, consider :attr:`channels` " -"instead." -msgstr "" - -#: discord.Guild.fetch_channels:12 of -#, fuzzy -msgid "Retrieving the channels failed." -msgstr ":exc:`.HTTPException` -- チャンネルの取得に失敗した。" - -#: discord.Guild.fetch_channels:14 of -msgid "All channels in the guild." -msgstr "" - -#: discord.Guild.fetch_members:3 of -#, fuzzy -msgid "" -"Retrieves an :class:`.AsyncIterator` that enables receiving the guild's " -"members." -msgstr "Botが所属するGuildを取得できる、 :class:`AsyncIterator` を取得します。" - -#: discord.Guild.fetch_members:7 of -#, fuzzy -msgid "" -"This method is an API call. For general usage, consider :attr:`members` " -"instead." -msgstr "これはAPIを呼び出します。通常は :attr:`guilds` を代わりに使用してください。" - -#: discord.Guild.fetch_members:13 of -msgid "" -"The number of members to retrieve. Defaults to 1000. Pass ``None`` to " -"fetch all members. Note that this is potentially slow." -msgstr "" - -#: discord.Guild.fetch_members:16 of -#, fuzzy -msgid "" -"Retrieve members after this date or object. If a date is provided it must" -" be a timezone-naive datetime representing UTC time." -msgstr "" -"この日付またはオブジェクトの後のGuildを取得します。もし日付が与えられた場合は、それはUTC時刻を表し、timezone " -"naiveであるdatetimeでないといけません。" - -#: discord.Guild.fetch_members:20 of -#, fuzzy -msgid "Getting the members failed." -msgstr "メンバーメンバーが退席中。" - -#: discord.Guild.fetch_members:22 of -#, fuzzy -msgid ":class:`.Member` -- The member with the member data parsed." -msgstr ":class:`.Guild` -- データを解析したGuild。" - -#: discord.Guild.fetch_member:3 of -msgid "Retreives a :class:`Member` from a guild ID, and a member ID." -msgstr "" - -#: discord.Guild.fetch_member:7 of -msgid "" -"This method is an API call. For general usage, consider " -":meth:`get_member` instead." -msgstr "" - -#: discord.Guild.fetch_member:9 of -msgid "The member's ID to fetch from." -msgstr "" - -#: discord.Guild.fetch_member:13 of -#, fuzzy -msgid "Fetching the member failed." -msgstr "メンバーメンバーが退席中。" - -#: discord.Guild.fetch_member:15 of -msgid "The member from the member ID." -msgstr "" - -#: discord.Guild.fetch_ban:3 of -msgid "" -"Retrieves the :class:`BanEntry` for a user, which is a namedtuple with a " -"``user`` and ``reason`` field. See :meth:`bans` for more information." -msgstr "" - -#: discord.Guild.bans:10 discord.Guild.fetch_ban:7 of -msgid "" -"You must have the :attr:`~Permissions.ban_members` permission to get this" -" information." -msgstr "" - -#: discord.Guild.fetch_ban:10 of -msgid "The user to get ban information from." -msgstr "" - -#: discord.Guild.fetch_ban:14 of -#, fuzzy -msgid "This user is not banned." -msgstr "Banが解除されたユーザー。" - -#: discord.Guild.fetch_ban:17 of -msgid "The BanEntry object for the specified user." -msgstr "" - -#: discord.Guild.bans:3 of -msgid "Retrieves all the users that are banned from the guild." -msgstr "" - -#: discord.Guild.bans:5 of -msgid "" -"This coroutine returns a :class:`list` of BanEntry objects, which is a " -"namedtuple with a ``user`` field to denote the :class:`User` that got " -"banned along with a ``reason`` field specifying why the user was banned " -"that could be set to ``None``." -msgstr "" - -#: discord.Guild.bans:16 of -msgid "A list of BanEntry objects." -msgstr "" - -#: discord.Guild.prune_members:3 of -msgid "Prunes the guild from its inactive members." -msgstr "" - -#: discord.Guild.prune_members:5 of -msgid "" -"The inactive members are denoted if they have not logged on in ``days`` " -"number of days and they have no roles." -msgstr "" - -#: discord.Guild.prune_members:8 of -msgid "" -"You must have the :attr:`~Permissions.kick_members` permission to use " -"this." -msgstr "" - -#: discord.Guild.prune_members:11 of -msgid "" -"To check how many members you would prune without actually pruning, see " -"the :meth:`estimate_pruned_members` function." -msgstr "" - -#: discord.Guild.prune_members:14 of -msgid "To prune members that have specific roles see the ``roles`` parameter." -msgstr "" - -#: discord.Guild.prune_members:16 of -msgid "The ``roles`` keyword-only parameter was added." -msgstr "" - -#: discord.Guild.estimate_pruned_members:7 discord.Guild.prune_members:19 of -msgid "The number of days before counting as inactive." -msgstr "" - -#: discord.Guild.prune_members:23 of -msgid "" -"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``." -msgstr "" - -#: discord.Guild.prune_members:28 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.estimate_pruned_members:10 discord.Guild.prune_members:32 of -#, fuzzy -msgid "You do not have permissions to prune members." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.Guild.prune_members:33 of -msgid "An error occurred while pruning members." -msgstr "" - -#: discord.Guild.estimate_pruned_members:12 discord.Guild.prune_members:34 of -msgid "An integer was not passed for ``days``." -msgstr "" - -#: discord.Guild.prune_members:36 of -msgid "" -"The number of members pruned. If ``compute_prune_count`` is ``False`` " -"then this returns ``None``." -msgstr "" - -#: discord.Guild.webhooks:3 of -msgid "Gets the list of webhooks from this guild." -msgstr "" - -#: discord.Guild.webhooks:5 discord.TextChannel.create_webhook:5 -#: discord.TextChannel.webhooks:5 of -msgid "Requires :attr:`~.Permissions.manage_webhooks` permissions." -msgstr "" - -#: discord.Guild.webhooks:7 discord.TextChannel.webhooks:7 of -#, fuzzy -msgid "You don't have permissions to get the webhooks." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Guild.webhooks:9 of -msgid "The webhooks for this guild." -msgstr "" - -#: discord.Guild.webhooks:10 discord.TextChannel.webhooks:10 of -msgid "List[:class:`Webhook`]" -msgstr "" - -#: discord.Guild.estimate_pruned_members:3 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.estimate_pruned_members:11 of -msgid "An error occurred while fetching the prune members estimate." -msgstr "" - -#: discord.Guild.estimate_pruned_members:14 of -msgid "The number of members estimated to be pruned." -msgstr "" - -#: discord.Guild.invites:3 of -msgid "Returns a list of all active instant invites from the guild." -msgstr "" - -#: discord.Guild.invites:5 of -msgid "" -"You must have the :attr:`~Permissions.manage_guild` permission to get " -"this information." -msgstr "" - -#: discord.Guild.invites:12 of -msgid "List[:class:`Invite`]" -msgstr "" - -#: discord.Guild.create_integration:3 of -#, fuzzy -msgid "Attaches an integration to the guild." -msgstr "ギルドの名前。" - -#: discord.Guild.create_integration:5 discord.Guild.integrations:5 -#: discord.Integration.delete:5 discord.Integration.edit:5 -#: discord.Integration.sync:5 of -#, fuzzy -msgid "You must have the :attr:`~Permissions.manage_guild` permission to do this." -msgstr "これを行うためには、そのチャンネルの :attr:`~.Permissions.read_message_history` 権限が必要です。" - -#: discord.Guild.create_integration:10 of -msgid "The integration type (e.g. Twitch)." -msgstr "" - -#: discord.Guild.create_integration:12 discord.Integration:7 of -msgid "The integration ID." -msgstr "" - -#: discord.Guild.create_integration:15 discord.Guild.integrations:10 of -#, fuzzy -msgid "You do not have permission to create the integration." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.Guild.create_integration:16 of -msgid "The account could not be found." -msgstr "" - -#: discord.Guild.integrations:3 of -msgid "Returns a list of all integrations attached to the guild." -msgstr "" - -#: discord.Guild.integrations:11 of -msgid "Fetching the integrations failed." -msgstr "" - -#: discord.Guild.integrations:13 of -msgid "The list of integrations that are attached to the guild." -msgstr "" - -#: discord.Guild.integrations:14 of -msgid "List[:class:`Integration`]" -msgstr "" - -#: discord.Guild.fetch_emojis:3 of -msgid "Retrieves all custom :class:`Emoji`\\s from the guild." -msgstr "" - -#: discord.Guild.fetch_emojis:7 of -msgid "" -"This method is an API call. For general usage, consider :attr:`emojis` " -"instead." -msgstr "" - -#: discord.Guild.fetch_emojis:9 of -msgid "An error occurred fetching the emojis." -msgstr "" - -#: discord.Guild.fetch_emojis:11 of -msgid "The retrieved emojis." -msgstr "" - -#: discord.Guild.fetch_emojis:12 of -msgid "List[:class:`Emoji`]" -msgstr "" - -#: discord.Guild.fetch_emoji:3 of -msgid "Retrieves a custom :class:`Emoji` from the guild." -msgstr "" - -#: discord.Guild.fetch_emoji:7 of -msgid "" -"This method is an API call. For general usage, consider iterating over " -":attr:`emojis` instead." -msgstr "" - -#: discord.Emoji:37 discord.Guild.fetch_emoji:10 of -msgid "The emoji's ID." -msgstr "" - -#: discord.Guild.fetch_emoji:13 of -msgid "The emoji requested could not be found." -msgstr "" - -#: discord.Guild.fetch_emoji:14 of -msgid "An error occurred fetching the emoji." -msgstr "" - -#: discord.Guild.fetch_emoji:16 of -msgid "The retrieved emoji." -msgstr "" - -#: discord.Guild.create_custom_emoji:25 discord.Guild.fetch_emoji:17 -#: discord.Intents.emojis:9 of -msgid ":class:`Emoji`" -msgstr "" - -#: discord.Guild.create_custom_emoji:3 of -msgid "Creates a custom :class:`Emoji` for the guild." -msgstr "" - -#: discord.Guild.create_custom_emoji:5 of -msgid "" -"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." -msgstr "" - -#: discord.Guild.create_custom_emoji:8 of -msgid "" -"You must have the :attr:`~Permissions.manage_emojis` permission to do " -"this." -msgstr "" - -#: discord.Guild.create_custom_emoji:11 of -msgid "The emoji name. Must be at least 2 characters." -msgstr "" - -#: discord.Guild.create_custom_emoji:13 of -msgid "" -"The :term:`py:bytes-like object` representing the image data to use. Only" -" JPG, PNG and GIF images are supported." -msgstr "" - -#: discord.Emoji.edit:10 discord.Guild.create_custom_emoji:16 of -msgid "" -"A :class:`list` of :class:`Role`\\s that can use this emoji. Leave empty " -"to make it available to everyone." -msgstr "" - -#: discord.Guild.create_custom_emoji:18 of -msgid "The reason for creating this emoji. Shows up on the audit log." -msgstr "" - -#: discord.Guild.create_custom_emoji:21 of -#, fuzzy -msgid "You are not allowed to create emojis." -msgstr "10以上のギルドに参加しているBotアカウントはギルドの作成ができません。" - -#: discord.Guild.create_custom_emoji:22 of -msgid "An error occurred creating an emoji." -msgstr "" - -#: discord.Guild.create_custom_emoji:24 of -msgid "The created emoji." -msgstr "" - -#: discord.Guild.fetch_roles:3 of -#, fuzzy -msgid "Retrieves all :class:`Role` that the guild has." -msgstr "特定のIDの :class:`.Webhook` を取得します。" - -#: discord.Guild.fetch_roles:7 of -#, fuzzy -msgid "" -"This method is an API call. For general usage, consider :attr:`roles` " -"instead." -msgstr "これはAPIを呼び出します。通常は :attr:`guilds` を代わりに使用してください。" - -#: discord.Guild.fetch_roles:11 of -#, fuzzy -msgid "Retrieving the roles failed." -msgstr "役職の名前を返します。" - -#: discord.Guild.fetch_roles:13 of -#, fuzzy -msgid "All roles in the guild." -msgstr "ギルドの名前。" - -#: discord.Guild.create_role:3 of -msgid "Creates a :class:`Role` for the guild." -msgstr "" - -#: discord.Guild.create_role:5 discord.Role.edit:8 of -msgid "All fields are optional." -msgstr "" - -#: discord.Guild.create_role:7 discord.Guild.edit_role_positions:5 of -msgid "You must have the :attr:`~Permissions.manage_roles` permission to do this." -msgstr "" - -#: discord.Guild.create_role:10 of -msgid "The role name. Defaults to 'new role'." -msgstr "" - -#: discord.Guild.create_role:12 of -msgid "The permissions to have. Defaults to no permissions." -msgstr "" - -#: discord.Guild.create_role:14 of -msgid "" -"The colour for the role. Defaults to :meth:`Colour.default`. This is " -"aliased to ``color`` as well." -msgstr "" - -#: discord.Guild.create_role:17 of -msgid "" -"Indicates if the role should be shown separately in the member list. " -"Defaults to ``False``." -msgstr "" - -#: discord.Guild.create_role:20 of -msgid "" -"Indicates if the role should be mentionable by others. Defaults to " -"``False``." -msgstr "" - -#: discord.Guild.create_role:23 of -msgid "The reason for creating this role. Shows up on the audit log." -msgstr "" - -#: discord.Guild.create_role:26 of -#, fuzzy -msgid "You do not have permissions to create the role." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.Guild.create_role:27 of -#, fuzzy -msgid "Creating the role failed." -msgstr "役職の名前を返します。" - -#: discord.Guild.create_role:28 discord.Guild.edit_role_positions:29 of -msgid "An invalid keyword argument was given." -msgstr "" - -#: discord.Guild.create_role:30 of -msgid "The newly created role." -msgstr "" - -#: discord.Guild.edit_role_positions:3 of -#, fuzzy -msgid "Bulk edits a list of :class:`Role` in the guild." -msgstr ":class:`Role` がギルド全体で変更されたときに呼び出されます。" - -#: discord.Guild.edit_role_positions:10 of -#, fuzzy -msgid "Example:" -msgstr "例" - -#: discord.Guild.edit_role_positions:22 of -msgid "" -"A :class:`dict` of :class:`Role` to :class:`int` to change the positions " -"of each given role." -msgstr "" - -#: discord.Guild.edit_role_positions:24 of -msgid "The reason for editing the role positions. Shows up on the audit log." -msgstr "" - -#: discord.Guild.edit_role_positions:27 of -#, fuzzy -msgid "You do not have permissions to move the roles." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.Guild.edit_role_positions:28 of -#, fuzzy -msgid "Moving the roles failed." -msgstr "役職の名前を返します。" - -#: discord.Guild.edit_role_positions:31 of -msgid "A list of all the roles in the guild." -msgstr "" - -#: discord.Guild.kick:3 of -msgid "Kicks a user from the guild." -msgstr "" - -#: discord.Guild.ban:5 discord.Guild.kick:5 discord.Guild.unban:5 of -msgid "The user must meet the :class:`abc.Snowflake` abc." -msgstr "" - -#: discord.Guild.kick:7 of -msgid "You must have the :attr:`~Permissions.kick_members` permission to do this." -msgstr "" - -#: discord.Guild.kick:10 of -msgid "The user to kick from their guild." -msgstr "" - -#: discord.Guild.kick:12 of -msgid "The reason the user got kicked." -msgstr "" - -#: discord.Guild.kick:15 of -msgid "You do not have the proper permissions to kick." -msgstr "" - -#: discord.Guild.kick:16 of -msgid "Kicking failed." -msgstr "" - -#: discord.Guild.ban:3 of -msgid "Bans a user from the guild." -msgstr "" - -#: discord.Guild.ban:7 discord.Guild.unban:7 of -msgid "You must have the :attr:`~Permissions.ban_members` permission to do this." -msgstr "" - -#: discord.Guild.ban:10 of -msgid "The user to ban from their guild." -msgstr "" - -#: discord.Guild.ban:12 of -msgid "" -"The number of days worth of messages to delete from the user in the " -"guild. The minimum is 0 and the maximum is 7." -msgstr "" - -#: discord.Guild.ban:15 of -msgid "The reason the user got banned." -msgstr "" - -#: discord.Guild.ban:18 of -msgid "You do not have the proper permissions to ban." -msgstr "" - -#: discord.Guild.ban:19 of -msgid "Banning failed." -msgstr "" - -#: discord.Guild.unban:3 of -msgid "Unbans a user from the guild." -msgstr "" - -#: discord.Guild.unban:10 of -msgid "The user to unban." -msgstr "" - -#: discord.Guild.unban:15 of -msgid "You do not have the proper permissions to unban." -msgstr "" - -#: discord.Guild.unban:16 of -msgid "Unbanning failed." -msgstr "" - -#: discord.Guild.vanity_invite:3 of -msgid "Returns the guild's special vanity invite." -msgstr "" - -#: discord.Guild.vanity_invite:5 of -msgid "The guild must have ``VANITY_URL`` in :attr:`~Guild.features`." -msgstr "" - -#: discord.Guild.vanity_invite:7 of -msgid "" -"You must have the :attr:`~Permissions.manage_guild` permission to use " -"this as well." -msgstr "" - -#: discord.Guild.vanity_invite:10 of -#, fuzzy -msgid "You do not have the proper permissions to get this." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Guild.vanity_invite:11 of -#, fuzzy -msgid "Retrieving the vanity invite failed." -msgstr ":exc:`.HTTPException` -- 招待の取り消しに失敗した。" - -#: discord.Guild.vanity_invite:13 of -msgid "The special vanity invite." -msgstr "" - -#: discord.Guild.vanity_invite:14 discord.Widget.fetch_invite:13 of -msgid ":class:`Invite`" -msgstr "" - -#: discord.Guild.ack:3 of -msgid "Marks every message in this guild as read." -msgstr "" - -#: discord.Guild.widget:3 of -msgid "Returns the widget of the guild." -msgstr "" - -#: discord.Guild.widget:13 of -msgid ":class:`Widget`" -msgstr "" - -#: discord.Guild.chunk:3 of -msgid "" -"Requests all members that belong to this guild. In order to use this, " -":meth:`Intents.members` must be enabled." -msgstr "" - -#: discord.Guild.chunk:6 discord.Guild.query_members:6 of -msgid "This is a websocket operation and can be slow." -msgstr "" - -#: discord.Guild.chunk:10 of -msgid "Whether to cache the members as well." -msgstr "" - -#: discord.Guild.chunk:13 of -#, fuzzy -msgid "The members intent is not enabled." -msgstr "メンバーがオンライン。" - -#: discord.Guild.query_members:3 of -msgid "" -"Request members that belong to this guild whose username starts with the " -"query given." -msgstr "" - -#: discord.Guild.query_members:10 of -msgid "The string that the username's start with." -msgstr "" - -#: discord.Guild.query_members:12 of -msgid "" -"The maximum number of members to send back. This must be a number between" -" 5 and 100." -msgstr "" - -#: discord.Guild.query_members:15 of -msgid "" -"Whether to cache the members internally. This makes operations such as " -":meth:`get_member` work for those that matched." -msgstr "" - -#: discord.Guild.query_members:18 of -msgid "" -"List of user IDs to search for. If the user ID is not in the guild then " -"it won't be returned. .. versionadded:: 1.4" -msgstr "" - -#: discord.Guild.query_members:18 of -msgid "" -"List of user IDs to search for. If the user ID is not in the guild then " -"it won't be returned." -msgstr "" - -#: discord.Guild.query_members:23 of -msgid "The query timed out waiting for the members." -msgstr "" - -#: discord.Guild.query_members:24 of -msgid "Invalid parameters were passed to the function" -msgstr "" - -#: discord.Guild.query_members:26 of -msgid "The list of members that have matched the query." -msgstr "" - -#: discord.Guild.change_voice_state:3 of -#, fuzzy -msgid "Changes client's voice state in the guild." -msgstr "クライアントがギルドから退出した。" - -#: discord.Guild.change_voice_state:7 of -msgid "Channel the client wants to join. Use ``None`` to disconnect." -msgstr "" - -#: discord.Guild.change_voice_state:9 of -#, fuzzy -msgid "Indicates if the client should be self-muted." -msgstr "ボイスチャンネルに接続しているかどうかを表します。" - -#: discord.Guild.change_voice_state:11 of -msgid "Indicates if the client should be self-deafened." -msgstr "" - -#: ../../api.rst:2667 -#, fuzzy -msgid "Integration" -msgstr "列挙型" - -#: discord.Integration:1 of -#, fuzzy -msgid "Represents a guild integration." -msgstr "Discordの音声接続を表します。" - -#: discord.Integration:13 of -msgid "The integration name." -msgstr "" - -#: discord.Integration:19 of -#, fuzzy -msgid "The guild of the integration." -msgstr "連携サービスが更新されたギルド。" - -#: discord.CategoryChannel:33 discord.Emoji.guild:3 discord.Integration:21 -#: discord.Member:42 discord.Role:53 discord.Template:51 discord.TextChannel:31 -#: discord.VoiceChannel:31 of -#, fuzzy -msgid ":class:`Guild`" -msgstr ":class:`.Guild`" - -#: discord.Integration:25 of -msgid "The integration type (i.e. Twitch)." -msgstr "" - -#: discord.Integration:31 of -msgid "Whether the integration is currently enabled." -msgstr "" - -#: discord.Integration:37 of -msgid "Where the integration is currently syncing." -msgstr "" - -#: discord.Integration:43 of -msgid "The role which the integration uses for subscribers." -msgstr "" - -#: discord.Integration:49 of -msgid "" -"Whether emoticons should be synced for this integration (currently twitch" -" only)." -msgstr "" - -#: discord.Integration:51 discord.WidgetMember:73 discord.WidgetMember:79 -#: discord.WidgetMember:85 of -#, fuzzy -msgid "Optional[:class:`bool`]" -msgstr ":class:`bool`" - -#: discord.Integration:55 of -msgid "" -"The behaviour of expiring subscribers. Aliased to ``expire_behavior`` as " -"well." -msgstr "" - -#: discord.Integration:57 of -#, fuzzy -msgid ":class:`ExpireBehaviour`" -msgstr ":class:`.Webhook`" - -#: discord.Integration:61 of -msgid "The grace period (in days) for expiring subscribers." -msgstr "" - -#: discord.Integration:67 of -#, fuzzy -msgid "The user for the integration." -msgstr "リアクションを追加したユーザー。" - -#: discord.Integration:73 of -#, fuzzy -msgid "The integration account information." -msgstr "Botのアプリケーション情報。" - -#: discord.Integration:75 of -msgid ":class:`IntegrationAccount`" -msgstr "" - -#: discord.Integration:79 of -msgid "When the integration was last synced." -msgstr "" - -#: discord.Integration.edit:3 of -#, fuzzy -msgid "Edits the integration." -msgstr "クライアントユーザーの設定を変更します。" - -#: discord.Integration.edit:8 of -msgid "" -"The behaviour when an integration subscription lapses. Aliased to " -"``expire_behavior`` as well." -msgstr "" - -#: discord.Integration.edit:10 of -msgid "" -"The period (in days) where the integration will ignore lapsed " -"subscriptions." -msgstr "" - -#: discord.Integration.edit:12 of -msgid "" -"Where emoticons should be synced for this integration (currently twitch " -"only)." -msgstr "" - -#: discord.Integration.edit:15 of -#, fuzzy -msgid "You do not have permission to edit the integration." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Integration.edit:17 of -msgid "``expire_behaviour`` did not receive a :class:`ExpireBehaviour`." -msgstr "" - -#: discord.Integration.sync:3 of -#, fuzzy -msgid "Syncs the integration." -msgstr "非同期イテレータ。" - -#: discord.Integration.sync:8 of -#, fuzzy -msgid "You do not have permission to sync the integration." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Integration.sync:9 of -msgid "Syncing the integration failed." -msgstr "" - -#: discord.Integration.delete:3 of -msgid "Deletes the integration." -msgstr "" - -#: discord.Integration.delete:8 of -#, fuzzy -msgid "You do not have permission to delete the integration." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Integration.delete:9 of -msgid "Deleting the integration failed." -msgstr "" - -#: discord.IntegrationAccount:1 of -#, fuzzy -msgid "Represents an integration account." -msgstr "オーディオストリームを表します。" - -#: discord.IntegrationAccount:7 of -msgid "The account ID." -msgstr "" - -#: discord.IntegrationAccount:13 of -msgid "The account name." -msgstr "" - -#: ../../api.rst:2676 -msgid "Member" -msgstr "" - -#: discord.Member:1 of -msgid "Represents a Discord member to a :class:`Guild`." -msgstr "" - -#: discord.Member:3 of -msgid "This implements a lot of the functionality of :class:`User`." -msgstr "" - -#: discord.Member:9 of -msgid "" -"Checks if two members are equal. Note that this works with :class:`User` " -"instances too." -msgstr "" - -#: discord.Member:14 of -msgid "" -"Checks if two members are not equal. Note that this works with " -":class:`User` instances too." -msgstr "" - -#: discord.Member:19 of -msgid "Returns the member's hash." -msgstr "" - -#: discord.Member:23 of -msgid "Returns the member's name with the discriminator." -msgstr "" - -#: discord.Member:27 of -msgid "" -"A 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``." -msgstr "" - -#: discord.Member:34 of -msgid "The activities that the user is currently doing." -msgstr "" - -#: discord.Member:36 of -msgid "Tuple[Union[:class:`BaseActivity`, :class:`Spotify`]]" -msgstr "" - -#: discord.Member:40 of -#, fuzzy -msgid "The guild that the member belongs to." -msgstr "更新された後のギルド。" - -#: discord.Member:46 of -#, fuzzy -msgid "The guild specific nickname of the user." -msgstr "ユーザーのプロフィール。" - -#: discord.Member:52 of -msgid "" -"A 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``." -msgstr "" - -#: discord.Member.raw_status:1 of -msgid "The member's overall status as a string value." -msgstr "" - -#: discord.Member.status:1 of -msgid "" -"The member's overall status. If the value is unknown, then it will be a " -":class:`str` instead." -msgstr "" - -#: discord.Member.desktop_status:3 discord.Member.mobile_status:3 -#: discord.Member.status:3 discord.Member.web_status:3 discord.WidgetMember:49 -#: of -#, fuzzy -msgid ":class:`Status`" -msgstr ":class:`str`" - -#: discord.Member.mobile_status:1 of -msgid "The member's status on a mobile device, if applicable." -msgstr "" - -#: discord.Member.desktop_status:1 of -msgid "The member's status on the desktop client, if applicable." -msgstr "" - -#: discord.Member.web_status:1 of -msgid "The member's status on the web client, if applicable." -msgstr "" - -#: discord.Member.is_on_mobile:1 of -msgid "" -":class:`bool`: A helper function that determines if a member is active on" -" a mobile device." -msgstr "" - -#: discord.Member.colour:1 of -msgid "" -"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." -msgstr "" - -#: discord.Member.color:1 of -msgid "" -"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." -msgstr "" - -#: discord.Member.roles:1 of -msgid "" -"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." -msgstr "" - -#: discord.Member.roles:5 of -msgid "These roles are sorted by their position in the role hierarchy." -msgstr "" - -#: discord.Member.mention:1 of -msgid "Returns a string that allows you to mention the member." -msgstr "" - -#: discord.Member.activity:1 of -msgid "" -"Returns the primary activity the user is currently doing. Could be " -"``None`` if no activity is being done." -msgstr "" - -#: discord.Member.activity:6 of -msgid "" -"A user may have multiple activities, these can be accessed under " -":attr:`activities`." -msgstr "" - -#: discord.Member.activity:8 of -msgid "Union[:class:`BaseActivity`, :class:`Spotify`]" -msgstr "" - -#: discord.Member.mentioned_in:1 of -msgid "Checks if the member is mentioned in the specified message." -msgstr "" - -#: discord.Member.mentioned_in:6 of -#, fuzzy -msgid "Indicates if the member is mentioned in the message." -msgstr "指定のメッセージにユーザーに対するメンションが含まれているかを確認します。" - -#: discord.Member.top_role:1 of -#, fuzzy -msgid "Returns the member's highest role." -msgstr "オブジェクトのハッシュを返します。" - -#: discord.Member.top_role:3 of -msgid "" -"This is useful for figuring where a member stands in the role hierarchy " -"chain." -msgstr "" - -#: discord.Member.guild_permissions:1 of -msgid "Returns the member's guild permissions." -msgstr "" - -#: discord.Member.guild_permissions:3 of -msgid "" -"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 either " -":meth:`permissions_in` or :meth:`abc.GuildChannel.permissions_for`." -msgstr "" - -#: discord.Member.guild_permissions:9 of -msgid "" -"This does take into consideration guild ownership and the administrator " -"implication." -msgstr "" - -#: discord.Member.voice:1 of -#, fuzzy -msgid "Returns the member's current voice state." -msgstr "ボイスの状態が変わった `Member` 。" - -#: discord.Member.ban:3 of -msgid "Bans this member. Equivalent to :meth:`Guild.ban`." -msgstr "" - -#: discord.Member.unban:3 of -msgid "Unbans this member. Equivalent to :meth:`Guild.unban`." -msgstr "" - -#: discord.Member.kick:3 of -msgid "Kicks this member. Equivalent to :meth:`Guild.kick`." -msgstr "" - -#: discord.Member.edit:3 of -msgid "Edits the member's data." -msgstr "" - -#: discord.Member.edit:5 of -msgid "" -"Depending on the parameter passed, this requires different permissions " -"listed below:" -msgstr "" - -#: discord.Member.edit:8 of -msgid "Parameter" -msgstr "" - -#: discord.Member.edit:8 of -msgid "Permission" -msgstr "" - -#: discord.Member.edit:10 of -msgid "nick" -msgstr "" - -#: discord.Member.edit:10 of -msgid ":attr:`Permissions.manage_nicknames`" -msgstr ":attr:`Permissions.manage_nicknames`" - -#: discord.Member.edit:12 of -msgid "mute" -msgstr "" - -#: discord.Member.edit:12 of -msgid ":attr:`Permissions.mute_members`" -msgstr ":attr:`Permissions.mute_members`" - -#: discord.Member.edit:14 of -msgid "deafen" -msgstr "" - -#: discord.Member.edit:14 of -msgid ":attr:`Permissions.deafen_members`" -msgstr ":attr:`Permissions.deafen_members`" - -#: discord.Member.edit:16 of -msgid ":attr:`Permissions.manage_roles`" -msgstr ":attr:`Permissions.manage_roles`" - -#: discord.Member.edit:18 of -msgid "voice_channel" -msgstr "" - -#: discord.Member.edit:18 of -msgid ":attr:`Permissions.move_members`" -msgstr ":attr:`Permissions.move_members`" - -#: discord.Member.edit:23 of -msgid "Can now pass ``None`` to ``voice_channel`` to kick a member from voice." -msgstr "" - -#: discord.Member.edit:26 of -msgid "The member's new nickname. Use ``None`` to remove the nickname." -msgstr "" - -#: discord.Member.edit:28 of -msgid "Indicates if the member should be guild muted or un-muted." -msgstr "" - -#: discord.Member.edit:30 of -msgid "Indicates if the member should be guild deafened or un-deafened." -msgstr "" - -#: discord.Member.edit:32 of -msgid "The member's new list of roles. This *replaces* the roles." -msgstr "" - -#: discord.Member.edit:34 of -msgid "" -"The voice channel to move the member to. Pass ``None`` to kick them from " -"voice." -msgstr "" - -#: discord.Member.edit:37 of -msgid "The reason for editing this member. Shows up on the audit log." -msgstr "" - -#: discord.Member.edit:40 of -msgid "You do not have the proper permissions to the action requested." -msgstr "" - -#: discord.Member.edit:41 of -msgid "The operation failed." -msgstr "" - -#: discord.Member.move_to:3 of -msgid "Moves a member to a new voice channel (they must be connected first)." -msgstr "" - -#: discord.Member.move_to:5 of -msgid "" -"You must have the :attr:`~Permissions.move_members` permission to use " -"this." -msgstr "" - -#: discord.Member.move_to:8 of -msgid "This raises the same exceptions as :meth:`edit`." -msgstr "" - -#: discord.Member.move_to:10 of -msgid "Can now pass ``None`` to kick a member from voice." -msgstr "" - -#: discord.Member.move_to:13 of -msgid "" -"The new voice channel to move the member to. Pass ``None`` to kick them " -"from voice." -msgstr "" - -#: discord.Member.add_roles:3 of -msgid "Gives the member a number of :class:`Role`\\s." -msgstr "" - -#: discord.Member.add_roles:8 of -msgid "" -"An argument list of :class:`abc.Snowflake` representing a :class:`Role` " -"to give to the member." -msgstr "" - -#: discord.Member.add_roles:11 of -msgid "The reason for adding these roles. Shows up on the audit log." -msgstr "" - -#: discord.Member.add_roles:13 of -msgid "" -"Whether to atomically add roles. This will ensure that multiple " -"operations will always be applied regardless of the current state of the " -"cache." -msgstr "" - -#: discord.Member.add_roles:18 of -#, fuzzy -msgid "You do not have permissions to add these roles." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.Member.add_roles:19 of -msgid "Adding roles failed." -msgstr "" - -#: discord.Member.avatar:1 of -msgid "Equivalent to :attr:`User.avatar`" -msgstr "" - -#: discord.Member.avatar_url:1 of -msgid "Equivalent to :attr:`User.avatar_url`" -msgstr "" - -#: discord.Member.bot:1 of -msgid "Equivalent to :attr:`User.bot`" -msgstr "" - -#: discord.Member.created_at:1 of -msgid "Equivalent to :attr:`User.created_at`" -msgstr "" - -#: discord.Member.default_avatar:1 of -msgid "Equivalent to :attr:`User.default_avatar`" -msgstr "" - -#: discord.Member.default_avatar_url:1 of -msgid "Equivalent to :attr:`User.default_avatar_url`" -msgstr "" - -#: discord.Member.discriminator:1 of -msgid "Equivalent to :attr:`User.discriminator`" -msgstr "" - -#: discord.Member.dm_channel:1 of -msgid "Equivalent to :attr:`User.dm_channel`" -msgstr "" - -#: discord.Member.id:1 of -msgid "Equivalent to :attr:`User.id`" -msgstr "" - -#: discord.Member.name:1 of -msgid "Equivalent to :attr:`User.name`" -msgstr "" - -#: discord.Member.public_flags:1 of -msgid "Equivalent to :attr:`User.public_flags`" -msgstr "" - -#: discord.Member.relationship:1 of -msgid "Equivalent to :attr:`User.relationship`" -msgstr "" - -#: discord.Member.remove_roles:3 of -msgid "Removes :class:`Role`\\s from this member." -msgstr "" - -#: discord.Member.remove_roles:8 of -msgid "" -"An argument list of :class:`abc.Snowflake` representing a :class:`Role` " -"to remove from the member." -msgstr "" - -#: discord.Member.remove_roles:11 of -msgid "The reason for removing these roles. Shows up on the audit log." -msgstr "" - -#: discord.Member.remove_roles:13 of -msgid "" -"Whether to atomically remove roles. This will ensure that multiple " -"operations will always be applied regardless of the current state of the " -"cache." -msgstr "" - -#: discord.Member.remove_roles:18 of -#, fuzzy -msgid "You do not have permissions to remove these roles." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.Member.remove_roles:19 of -#, fuzzy -msgid "Removing the roles failed." -msgstr "役職の名前を返します。" - -#: discord.Member.system:1 of -msgid "Equivalent to :attr:`User.system`" -msgstr "" - -#: ../../api.rst:2690 -msgid "Spotify" -msgstr "" - -#: discord.Spotify:1 of -msgid "" -"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." -msgstr "" - -#: discord.CustomActivity:7 discord.Spotify:8 of -msgid "Checks if two activities are equal." -msgstr "" - -#: discord.CustomActivity:11 discord.Spotify:12 of -msgid "Checks if two activities are not equal." -msgstr "" - -#: discord.CustomActivity:15 discord.Spotify:16 of -msgid "Returns the activity's hash." -msgstr "" - -#: discord.Spotify:20 of -msgid "Returns the string 'Spotify'." -msgstr "" - -#: discord.CustomActivity.type:1 discord.Spotify.type:1 of -msgid "" -"Returns the activity's type. This is for compatibility with " -":class:`Activity`." -msgstr "" - -#: discord.Spotify.type:3 of -msgid "It always returns :attr:`ActivityType.listening`." -msgstr "" - -#: discord.Activity:34 discord.CustomActivity.type:5 discord.Game.type:5 -#: discord.Spotify.type:5 discord.Streaming.type:5 of -#, fuzzy -msgid ":class:`ActivityType`" -msgstr ":class:`.Invite`" - -#: discord.Spotify.created_at:1 of -#, fuzzy -msgid "When the user started listening in UTC." -msgstr "入力を始めたユーザー。" - -#: discord.Spotify.color:1 discord.Spotify.colour:1 of -msgid "Returns the Spotify integration colour, as a :class:`Colour`." -msgstr "" - -#: discord.Spotify.colour:3 of -msgid "There is an alias for this named :attr:`color`" -msgstr "" - -#: discord.Spotify.color:3 of -msgid "There is an alias for this named :attr:`colour`" -msgstr "" - -#: discord.Spotify.name:1 of -msgid "The activity's name. This will always return \"Spotify\"." -msgstr "" - -#: discord.Spotify.title:1 of -#, fuzzy -msgid "The title of the song being played." -msgstr "更新される前のギルド。" - -#: discord.Spotify.artists:1 of -#, fuzzy -msgid "The artists of the song being played." -msgstr "更新される前のギルド。" - -#: discord.Spotify.artist:1 of -#, fuzzy -msgid "The artist of the song being played." -msgstr "更新される前のギルド。" - -#: discord.Spotify.artist:3 of -msgid "" -"This does not attempt to split the artist information into multiple " -"artists. Useful if there's only a single artist." -msgstr "" - -#: discord.Spotify.album:1 of -msgid "The album that the song being played belongs to." -msgstr "" - -#: discord.Spotify.album_cover_url:1 of -msgid "The album cover image URL from Spotify's CDN." -msgstr "" - -#: discord.Spotify.track_id:1 of -msgid "The track ID used by Spotify to identify this song." -msgstr "" - -#: discord.Spotify.start:1 of -msgid "When the user started playing this song in UTC." -msgstr "" - -#: discord.Spotify.end:1 of -msgid "When the user will stop playing this song in UTC." -msgstr "" - -#: discord.Spotify.duration:1 of -#, fuzzy -msgid "The duration of the song being played." -msgstr "更新される前のギルド。" - -#: discord.Spotify.party_id:1 of -#, fuzzy -msgid "The party ID of the listening party." -msgstr "ユーザーのプロフィール。" - -#: ../../api.rst:2696 -msgid "VoiceState" -msgstr "" - -#: discord.VoiceState:1 of -msgid "Represents a Discord user's voice state." -msgstr "" - -#: discord.VoiceState:5 of -msgid "Indicates if the user is currently deafened by the guild." -msgstr "" - -#: discord.VoiceState:11 of -msgid "Indicates if the user is currently muted by the guild." -msgstr "" - -#: discord.VoiceState:17 of -#, fuzzy -msgid "Indicates if the user is currently muted by their own accord." -msgstr "現在オーディオを再生しているかを表します。" - -#: discord.VoiceState:23 of -#, fuzzy -msgid "Indicates if the user is currently deafened by their own accord." -msgstr "メンバーが自身でマイクやスピーカーをミュートしたとき。" - -#: discord.VoiceState:29 of -#, fuzzy -msgid "Indicates if the user is currently streaming via 'Go Live' feature." -msgstr "現在オーディオを再生しているかを表します。" - -#: discord.VoiceState:37 of -#, fuzzy -msgid "Indicates if the user is currently broadcasting video." -msgstr "現在オーディオを再生しているかを表します。" - -#: discord.VoiceState:43 of -msgid "Indicates if the user is currently in the AFK channel in the guild." -msgstr "" - -#: discord.VoiceState:49 of -msgid "" -"The voice channel that the user is currently connected to. ``None`` if " -"the user is not currently in a voice channel." -msgstr "" - -#: ../../api.rst:2702 -msgid "Emoji" -msgstr "" - -#: discord.Emoji:1 of -msgid "Represents a custom emoji." -msgstr "" - -#: discord.Emoji:10 discord.PartialEmoji:12 of -msgid "Checks if two emoji are the same." -msgstr "" - -#: discord.Emoji:14 discord.PartialEmoji:16 of -msgid "Checks if two emoji are not the same." -msgstr "" - -#: discord.Emoji:18 discord.PartialEmoji:20 of -msgid "Return the emoji's hash." -msgstr "" - -#: discord.Emoji:22 of -msgid "" -"Returns an iterator of ``(field, value)`` pairs. This allows this class " -"to be used as an iterable in list/dict/etc constructions." -msgstr "" - -#: discord.Emoji:27 discord.PartialEmoji:24 of -msgid "Returns the emoji rendered for discord." -msgstr "" - -#: discord.Emoji:31 of -#, fuzzy -msgid "The name of the emoji." -msgstr "ギルドの名前。" - -#: discord.Emoji:43 of -msgid "" -"If colons are required to use this emoji in the client (:PJSalt: vs " -"PJSalt)." -msgstr "" - -#: discord.Emoji:49 of -msgid "Whether an emoji is animated or not." -msgstr "" - -#: discord.Emoji:55 of -msgid "If this emoji is managed by a Twitch integration." -msgstr "" - -#: discord.Emoji:61 of -#, fuzzy -msgid "The guild ID the emoji belongs to." -msgstr "絵文字が更新されたギルド。" - -#: discord.Emoji:67 of -msgid "Whether the emoji is available for use." -msgstr "" - -#: discord.Emoji:73 of -msgid "" -"The user that created the emoji. This can only be retrieved using " -":meth:`Guild.fetch_emoji` and having the " -":attr:`~Permissions.manage_emojis` permission." -msgstr "" - -#: discord.Emoji:76 of -#, fuzzy -msgid "Optional[:class:`User`]" -msgstr ":class:`str`" - -#: discord.Emoji.created_at:1 of -msgid "Returns the emoji's creation time in UTC." -msgstr "" - -#: discord.Emoji.url:1 of -msgid "Returns the asset of the emoji." -msgstr "" - -#: discord.Emoji.roles:1 of -msgid "A :class:`list` of roles that is allowed to use this emoji." -msgstr "" - -#: discord.Emoji.roles:3 of -msgid "If roles is empty, the emoji is unrestricted." -msgstr "" - -#: discord.Emoji.guild:1 of -#, fuzzy -msgid "The guild this emoji belongs to." -msgstr "絵文字が更新されたギルド。" - -#: discord.Emoji.is_usable:1 of -msgid ":class:`bool`: Whether the bot can use this emoji." -msgstr "" - -#: discord.Emoji.delete:3 of -msgid "Deletes the custom emoji." -msgstr "" - -#: discord.Emoji.delete:5 discord.Emoji.edit:5 of -msgid "You must have :attr:`~Permissions.manage_emojis` permission to do this." -msgstr "" - -#: discord.Emoji.delete:8 of -msgid "The reason for deleting this emoji. Shows up on the audit log." -msgstr "" - -#: discord.Emoji.delete:11 of -msgid "You are not allowed to delete emojis." -msgstr "" - -#: discord.Emoji.delete:12 of -msgid "An error occurred deleting the emoji." -msgstr "" - -#: discord.Emoji.edit:3 of -msgid "Edits the custom emoji." -msgstr "" - -#: discord.Emoji.edit:8 of -msgid "The new emoji name." -msgstr "" - -#: discord.Emoji.edit:12 of -msgid "The reason for editing this emoji. Shows up on the audit log." -msgstr "" - -#: discord.Emoji.edit:15 of -msgid "You are not allowed to edit emojis." -msgstr "" - -#: discord.Emoji.edit:16 of -msgid "An error occurred editing the emoji." -msgstr "" - -#: ../../api.rst:2708 -msgid "PartialEmoji" -msgstr "" - -#: discord.PartialEmoji:1 of -msgid "Represents a \"partial\" emoji." -msgstr "" - -#: discord.PartialEmoji:3 of -msgid "This model will be given in two scenarios:" -msgstr "" - -#: discord.PartialEmoji:5 of -msgid "\"Raw\" data events such as :func:`on_raw_reaction_add`" -msgstr "" - -#: discord.PartialEmoji:6 of -msgid "Custom emoji that the bot cannot see from e.g. :attr:`Message.reactions`" -msgstr "" - -#: discord.PartialEmoji:28 of -msgid "" -"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)." -msgstr "" - -#: discord.PartialEmoji:36 of -msgid "Whether the emoji is animated or not." -msgstr "" - -#: discord.PartialEmoji:42 of -msgid "The ID of the custom emoji, if applicable." -msgstr "" - -#: discord.PartialEmoji.is_custom_emoji:1 of -#, fuzzy -msgid ":class:`bool`: Checks if this is a custom non-Unicode emoji." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.PartialEmoji.is_unicode_emoji:1 of -#, fuzzy -msgid ":class:`bool`: Checks if this is a Unicode emoji." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.PartialEmoji.url:1 of -msgid "Returns an asset of the emoji, if it is custom." -msgstr "" - -#: ../../api.rst:2714 -msgid "Role" -msgstr "" - -#: discord.Role:1 of -msgid "Represents a Discord role in a :class:`Guild`." -msgstr "" - -#: discord.Role:7 of -msgid "Checks if two roles are equal." -msgstr "" - -#: discord.Role:11 of -msgid "Checks if two roles are not equal." -msgstr "" - -#: discord.Role:15 of -msgid "Checks if a role is higher than another in the hierarchy." -msgstr "" - -#: discord.Role:19 of -msgid "Checks if a role is lower than another in the hierarchy." -msgstr "" - -#: discord.Role:23 of -msgid "Checks if a role is higher or equal to another in the hierarchy." -msgstr "" - -#: discord.Role:27 of -msgid "Checks if a role is lower or equal to another in the hierarchy." -msgstr "" - -#: discord.Role:31 of -msgid "Return the role's hash." -msgstr "役職のハッシュを返します。" - -#: discord.Role:35 of -msgid "Returns the role's name." -msgstr "役職の名前を返します。" - -#: discord.Role:39 of -#, fuzzy -msgid "The ID for the role." -msgstr "IDから取得したギルド。" - -#: discord.Role:45 of -#, fuzzy -msgid "The name of the role." -msgstr "ギルドの名前。" - -#: discord.Role:51 of -#, fuzzy -msgid "The guild the role belongs to." -msgstr "このプロフィールを持つ :class:`User` 。" - -#: discord.Role:57 of -msgid "Indicates if the role will be displayed separately from other members." -msgstr "" - -#: discord.Role:63 of -msgid "" -"The position of the role. This number is usually positive. The bottom " -"role has a position of 0." -msgstr "" - -#: discord.Role:70 of -msgid "" -"Indicates if the role is managed by the guild through some form of " -"integrations such as Twitch." -msgstr "" - -#: discord.Role:77 of -#, fuzzy -msgid "Indicates if the role can be mentioned by users." -msgstr "ボイスチャンネルに接続しているかどうかを表します。" - -#: discord.Role.is_default:1 of -#, fuzzy -msgid ":class:`bool`: Checks if the role is the default role." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.Role.permissions:1 of -#, fuzzy -msgid "Returns the role's permissions." -msgstr "役職の名前を返します。" - -#: discord.Role.colour:1 of -msgid "Returns the role colour. An alias exists under ``color``." -msgstr "" - -#: discord.Role.color:1 of -msgid "Returns the role color. An alias exists under ``colour``." -msgstr "" - -#: discord.Role.created_at:1 of -#, fuzzy -msgid "Returns the role's creation time in UTC." -msgstr "役職の名前を返します。" - -#: discord.Role.mention:1 of -msgid "Returns a string that allows you to mention a role." -msgstr "" - -#: discord.Role.members:1 of -#, fuzzy -msgid "Returns all the members with this role." -msgstr "ユーザー名とディスクリミネータを返します。" - -#: discord.Role.edit:3 of -msgid "Edits the role." -msgstr "" - -#: discord.Role.edit:10 of -msgid "Can now pass ``int`` to ``colour`` keyword-only parameter." -msgstr "" - -#: discord.Role.edit:13 of -msgid "The new role name to change to." -msgstr "" - -#: discord.Role.edit:15 of -msgid "The new permissions to change to." -msgstr "" - -#: discord.Role.edit:17 of -msgid "The new colour to change to. (aliased to color as well)" -msgstr "" - -#: discord.Role.edit:19 of -msgid "Indicates if the role should be shown separately in the member list." -msgstr "" - -#: discord.Role.edit:21 of -msgid "Indicates if the role should be mentionable by others." -msgstr "" - -#: discord.Role.edit:23 of -msgid "" -"The new role's position. This must be below your top role's position or " -"it will fail." -msgstr "" - -#: discord.Role.edit:26 of -msgid "The reason for editing this role. Shows up on the audit log." -msgstr "" - -#: discord.Role.edit:29 of -#, fuzzy -msgid "You do not have permissions to change the role." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Role.edit:30 of -#, fuzzy -msgid "Editing the role failed." -msgstr "役職の名前を返します。" - -#: discord.Role.edit:31 of -msgid "" -"An invalid position was given or the default role was asked to be " -"moved." -msgstr "" - -#: discord.Role.delete:3 of -msgid "Deletes the role." -msgstr "" - -#: discord.Role.delete:8 of -msgid "The reason for deleting this role. Shows up on the audit log." -msgstr "" - -#: discord.Role.delete:11 of -#, fuzzy -msgid "You do not have permissions to delete the role." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.Role.delete:12 of -#, fuzzy -msgid "Deleting the role failed." -msgstr "役職の名前を返します。" - -#: ../../api.rst:2720 -msgid "TextChannel" -msgstr "" - -#: discord.TextChannel:1 of -msgid "Represents a Discord guild text channel." -msgstr "" - -#: discord.CategoryChannel:9 discord.DMChannel:7 discord.GroupChannel:7 -#: discord.TextChannel:7 discord.VoiceChannel:7 of -msgid "Checks if two channels are equal." -msgstr "" - -#: discord.CategoryChannel:13 discord.DMChannel:11 discord.GroupChannel:11 -#: discord.TextChannel:11 discord.VoiceChannel:11 of -msgid "Checks if two channels are not equal." -msgstr "" - -#: discord.DMChannel:15 discord.GroupChannel:15 discord.TextChannel:15 -#: discord.VoiceChannel:15 of -msgid "Returns the channel's hash." -msgstr "" - -#: discord.TextChannel:19 discord.VoiceChannel:19 of -msgid "Returns the channel's name." -msgstr "" - -#: discord.TextChannel:35 discord.VoiceChannel:35 of -#, fuzzy -msgid "The channel ID." -msgstr "テキストチャンネル。" - -#: discord.TextChannel:41 discord.VoiceChannel:41 of -msgid "The category channel ID this channel belongs to, if applicable." -msgstr "" - -#: discord.TextChannel:47 of -msgid "The channel's topic. ``None`` if it doesn't exist." -msgstr "" - -#: discord.TextChannel:60 of -msgid "" -"The last message ID of the message sent to this channel. It may *not* " -"point to an existing or valid message." -msgstr "" - -#: discord.TextChannel:67 of -msgid "" -"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." -msgstr "" - -#: discord.CategoryChannel.type:1 discord.DMChannel.type:1 -#: discord.GroupChannel.type:1 discord.TextChannel.type:1 -#: discord.VoiceChannel.type:1 of -#, fuzzy -msgid "The channel's Discord type." -msgstr "IDから取得したチャンネル。" - -#: discord.CategoryChannel.type:3 discord.DMChannel.type:3 -#: discord.GroupChannel.type:3 discord.PartialInviteChannel:40 -#: discord.TextChannel.type:3 discord.VoiceChannel.type:3 of -#, fuzzy -msgid ":class:`ChannelType`" -msgstr ":class:`.Invite`" - -#: discord.TextChannel.members:1 of -msgid "Returns all members that can see this channel." -msgstr "" - -#: discord.TextChannel.is_nsfw:1 of -#, fuzzy -msgid ":class:`bool`: Checks if the channel is NSFW." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.TextChannel.is_news:1 of -#, fuzzy -msgid ":class:`bool`: Checks if the channel is a news channel." -msgstr ":class:`bool` -- ユーザーがBotアカウントであるかを表します。" - -#: discord.TextChannel.last_message:1 of -msgid "Fetches the last message from this channel in cache." -msgstr "" - -#: discord.TextChannel.last_message:3 of -msgid "The message might not be valid or point to an existing message." -msgstr "" - -#: discord.TextChannel.last_message:5 of -msgid "Reliable Fetching" -msgstr "" - -#: discord.TextChannel.last_message:8 of -msgid "" -"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." -msgstr "" - -#: discord.TextChannel.last_message:13 of -msgid "The last message in this channel or ``None`` if not found." -msgstr "" - -#: discord.CategoryChannel.edit:3 discord.TextChannel.edit:3 -#: discord.VoiceChannel.edit:3 of -msgid "Edits the channel." -msgstr "" - -#: discord.CategoryChannel.edit:5 discord.TextChannel.edit:5 -#: discord.VoiceChannel.edit:5 of -msgid "" -"You must have the :attr:`~Permissions.manage_channels` permission to use " -"this." -msgstr "" - -#: discord.CategoryChannel.edit:8 discord.TextChannel.edit:8 -#: discord.VoiceChannel.edit:8 of -msgid "The ``overwrites`` keyword-only parameter was added." -msgstr "" - -#: discord.TextChannel.edit:11 of -msgid "The ``type`` keyword-only parameter was added." -msgstr "" - -#: discord.TextChannel.edit:14 of -msgid "The new channel name." -msgstr "" - -#: discord.TextChannel.edit:18 discord.VoiceChannel.edit:17 of -msgid "The new channel's position." -msgstr "" - -#: discord.TextChannel.edit:22 discord.VoiceChannel.edit:19 of -msgid "" -"Whether to sync permissions with the channel's new or pre-existing " -"category. Defaults to ``False``." -msgstr "" - -#: discord.TextChannel.edit:25 discord.VoiceChannel.edit:22 of -msgid "The new category for this channel. Can be ``None`` to remove the category." -msgstr "" - -#: discord.TextChannel.edit:28 of -msgid "" -"Specifies the slowmode rate limit for user in this channel, in seconds. A" -" value of `0` disables slowmode. The maximum value possible is `21600`." -msgstr "" - -#: discord.TextChannel.edit:31 of -msgid "" -"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`." -msgstr "" - -#: discord.TextChannel.edit:35 discord.VoiceChannel.edit:25 of -msgid "The reason for editing this channel. Shows up on the audit log." -msgstr "" - -#: discord.CategoryChannel.edit:19 discord.TextChannel.edit:37 -#: discord.VoiceChannel.edit:27 of -msgid "" -"A :class:`dict` of target (either a role or a member) to " -":class:`PermissionOverwrite` to apply to the channel." -msgstr "" - -#: discord.TextChannel.edit:41 of -msgid "" -"If position is less than 0 or greater than the number of channels, or if" -" the permission overwrite information is not in proper form." -msgstr "" - -#: discord.TextChannel.edit:42 discord.VoiceChannel.edit:32 of -#, fuzzy -msgid "You do not have permissions to edit the channel." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.TextChannel.edit:43 discord.VoiceChannel.edit:33 of -#, fuzzy -msgid "Editing the channel failed." -msgstr ":exc:`.HTTPException` -- チャンネルの取得に失敗した。" - -#: discord.TextChannel.delete_messages:3 of -msgid "" -"Deletes a list of messages. This is similar to :meth:`Message.delete` " -"except it bulk deletes multiple messages." -msgstr "" - -#: discord.TextChannel.delete_messages:6 of -msgid "" -"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." -msgstr "" - -#: discord.TextChannel.delete_messages:10 of -msgid "" -"You cannot bulk delete more than 100 messages or messages that are older " -"than 14 days old." -msgstr "" - -#: discord.TextChannel.delete_messages:13 of -msgid "" -"You must have the :attr:`~Permissions.manage_messages` permission to use " -"this." -msgstr "" - -#: discord.TextChannel.delete_messages:16 of -msgid "Usable only by bot accounts." -msgstr "" - -#: discord.TextChannel.delete_messages:18 of -msgid "An iterable of messages denoting which ones to bulk delete." -msgstr "" - -#: discord.TextChannel.delete_messages:21 of -msgid "The number of messages to delete was more than 100." -msgstr "" - -#: discord.TextChannel.delete_messages:22 of -msgid "" -"You do not have proper permissions to delete the messages or you're " -"not using a bot account." -msgstr "" - -#: discord.TextChannel.delete_messages:23 of -msgid "If single delete, then the message was already deleted." -msgstr "" - -#: discord.TextChannel.delete_messages:24 of -#, fuzzy -msgid "Deleting the messages failed." -msgstr "削除されたメッセージ。" - -#: discord.TextChannel.purge:3 of -msgid "" -"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." -msgstr "" - -#: discord.TextChannel.purge:7 of -msgid "" -"You must have the :attr:`~Permissions.manage_messages` permission to " -"delete messages even if they are your own (unless you are a user " -"account). The :attr:`~Permissions.read_message_history` permission is " -"also needed to retrieve message history." -msgstr "" - -#: discord.TextChannel.purge:12 of -msgid "" -"Internally, this employs a different number of strategies depending on " -"the conditions met such as if a bulk delete is possible or if the account" -" is a user bot or not." -msgstr "" - -#: discord.TextChannel.purge:18 of -msgid "Deleting bot's messages ::" -msgstr "" - -#: discord.TextChannel.purge:26 of -msgid "" -"The number of messages to search through. This is not the number of " -"messages that will be deleted, though it can be." -msgstr "" - -#: discord.TextChannel.purge:29 of -msgid "" -"The function used to check if a message should be deleted. It must take a" -" :class:`Message` as its sole parameter." -msgstr "" - -#: discord.TextChannel.purge:32 of -msgid "Same as ``before`` in :meth:`history`." -msgstr "" - -#: discord.TextChannel.purge:34 of -msgid "Same as ``after`` in :meth:`history`." -msgstr "" - -#: discord.TextChannel.purge:36 of -msgid "Same as ``around`` in :meth:`history`." -msgstr "" - -#: discord.TextChannel.purge:38 of -msgid "Same as ``oldest_first`` in :meth:`history`." -msgstr "" - -#: discord.TextChannel.purge:40 of -msgid "" -"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 current account is a user bot, or if messages are older " -"than two weeks." -msgstr "" - -#: discord.TextChannel.purge:46 of -msgid "You do not have proper permissions to do the actions required." -msgstr "" - -#: discord.TextChannel.purge:47 of -msgid "Purging the messages failed." -msgstr "" - -#: discord.TextChannel.purge:49 of -msgid "The list of messages that were deleted." -msgstr "" - -#: discord.TextChannel.purge:50 of -msgid "List[:class:`.Message`]" -msgstr "" - -#: discord.TextChannel.webhooks:3 of -msgid "Gets the list of webhooks from this channel." -msgstr "" - -#: discord.TextChannel.webhooks:9 of -msgid "The webhooks for this channel." -msgstr "" - -#: discord.TextChannel.create_webhook:3 of -msgid "Creates a webhook for this channel." -msgstr "" - -#: discord.TextChannel.create_webhook:7 of -msgid "Added the ``reason`` keyword-only parameter." -msgstr "" - -#: discord.TextChannel.create_webhook:10 of -msgid "The webhook's name." -msgstr "" - -#: discord.TextChannel.create_webhook:12 of -msgid "" -"A :term:`py:bytes-like object` representing the webhook's default avatar." -" This operates similarly to :meth:`~ClientUser.edit`." -msgstr "" - -#: discord.TextChannel.create_webhook:15 of -msgid "The reason for creating this webhook. Shows up in the audit logs." -msgstr "" - -#: discord.TextChannel.create_webhook:18 of -#, fuzzy -msgid "Creating the webhook failed." -msgstr ":exc:`.HTTPException` -- Webhookの取得に失敗した。" - -#: discord.TextChannel.create_webhook:19 of -#, fuzzy -msgid "You do not have permissions to create a webhook." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: discord.TextChannel.create_webhook:21 discord.TextChannel.follow:22 of -msgid "The created webhook." -msgstr "" - -#: discord.TextChannel.follow:1 of -msgid "Follows a channel using a webhook." -msgstr "" - -#: discord.TextChannel.follow:3 of -#, fuzzy -msgid "Only news channels can be followed." -msgstr "チャンネルが作成されました。" - -#: discord.TextChannel.follow:7 of -msgid "" -"The webhook returned will not provide a token to do webhook actions, as " -"Discord does not provide it." -msgstr "" - -#: discord.TextChannel.follow:12 of -msgid "The channel you would like to follow from." -msgstr "" - -#: discord.TextChannel.follow:14 of -msgid "" -"The reason for following the channel. Shows up on the destination guild's" -" audit log. .. versionadded:: 1.4" -msgstr "" - -#: discord.TextChannel.follow:14 of -msgid "" -"The reason for following the channel. Shows up on the destination guild's" -" audit log." -msgstr "" - -#: discord.TextChannel.follow:19 of -msgid "Following the channel failed." -msgstr "" - -#: discord.TextChannel.follow:20 of -#, fuzzy -msgid "You do not have the permissions to create a webhook." -msgstr ":exc:`.Forbidden` -- このWebhookを取得する権限がない。" - -#: ../../api.rst:2734 -msgid "VoiceChannel" -msgstr "" - -#: discord.VoiceChannel:1 of -msgid "Represents a Discord guild voice channel." -msgstr "Discordサーバーのボイスチャンネルを表します。" - -#: discord.VoiceChannel.members:1 of -msgid "Returns all members that are currently inside this voice channel." -msgstr "" - -#: discord.VoiceChannel.voice_states:1 of -#, fuzzy -msgid "Returns a mapping of member IDs who have voice states in this channel." -msgstr "ボイスの状態が変わった `Member` 。" - -#: discord.VoiceChannel.voice_states:7 of -msgid "" -"This function is intentionally low level to replace :attr:`members` when " -"the member cache is unavailable." -msgstr "" - -#: discord.VoiceChannel.voice_states:10 of -#, fuzzy -msgid "The mapping of member ID to a voice state." -msgstr "ボイスの状態が変わった `Member` 。" - -#: discord.VoiceChannel.voice_states:11 of -msgid "Mapping[:class:`int`, :class:`VoiceState`]" -msgstr "" - -#: discord.VoiceChannel.edit:11 of -msgid "The new channel's name." -msgstr "" - -#: discord.VoiceChannel.edit:13 of -msgid "The new channel's bitrate." -msgstr "" - -#: discord.VoiceChannel.edit:15 of -msgid "The new channel's user limit." -msgstr "" - -#: discord.VoiceChannel.edit:31 of -msgid "If the permission overwrite information is not in proper form." -msgstr "" - -#: discord.VoiceChannel.connect:3 of -msgid "" -"Connects to voice and creates a :class:`VoiceClient` to establish your " -"connection to the voice server." -msgstr "" - -#: discord.VoiceChannel.connect:6 of -msgid "The timeout in seconds to wait for the voice endpoint." -msgstr "" - -#: discord.VoiceChannel.connect:8 of -msgid "" -"Whether the bot should automatically attempt a reconnect if a part of the" -" handshake fails or the gateway goes down." -msgstr "" - -#: discord.VoiceChannel.connect:12 of -msgid "" -"A type that subclasses :class:`~discord.VoiceProtocol` to connect with. " -"Defaults to :class:`~discord.VoiceClient`." -msgstr "" - -#: discord.VoiceChannel.connect:16 of -#, fuzzy -msgid "Could not connect to the voice channel in time." -msgstr ":class:`abc.Connectable` -- 接続しているボイスチャンネル。" - -#: discord.VoiceChannel.connect:17 of -#, fuzzy -msgid "You are already connected to a voice channel." -msgstr "メンバーがボイスチャンネルに参加したとき。" - -#: discord.VoiceChannel.connect:18 of -#, fuzzy -msgid "The opus library has not been loaded." -msgstr "opusライブラリがロードされているかを表します。" - -#: discord.VoiceChannel.connect:20 of -msgid "A voice client that is fully connected to the voice server." -msgstr "" - -#: discord.VoiceChannel.connect:21 of -#, fuzzy -msgid ":class:`~discord.VoiceProtocol`" -msgstr ":class:`~discord.User`" - -#: ../../api.rst:2741 -msgid "CategoryChannel" -msgstr "" - -#: discord.CategoryChannel:1 of -msgid "Represents a Discord channel category." -msgstr "Discordのチャンネルカテゴリを表します。" - -#: discord.CategoryChannel:3 of -msgid "These are useful to group channels to logical compartments." -msgstr "" - -#: discord.CategoryChannel:17 of -msgid "Returns the category's hash." -msgstr "カテゴリのハッシュを返します。" - -#: discord.CategoryChannel:21 of -msgid "Returns the category's name." -msgstr "カテゴリの名前を返します。" - -#: discord.CategoryChannel:25 of -#, fuzzy -msgid "The category name." -msgstr "カテゴリの名前を返します。" - -#: discord.CategoryChannel:31 of -#, fuzzy -msgid "The guild the category belongs to." -msgstr "更新された後のギルド。" - -#: discord.CategoryChannel:37 of -#, fuzzy -msgid "The category channel ID." -msgstr "新しいグループチャンネル。" - -#: discord.CategoryChannel:43 of -msgid "" -"The position in the category list. This is a number that starts at 0. " -"e.g. the top category is position 0." -msgstr "" - -#: discord.CategoryChannel.is_nsfw:1 of -#, fuzzy -msgid ":class:`bool`: Checks if the category is NSFW." -msgstr "カテゴリがNSFWであるかを返します。" - -#: discord.CategoryChannel.edit:11 of -msgid "The new category's name." -msgstr "" - -#: discord.CategoryChannel.edit:13 of -msgid "The new category's position." -msgstr "" - -#: discord.CategoryChannel.edit:15 of -msgid "To mark the category as NSFW or not." -msgstr "" - -#: discord.CategoryChannel.edit:17 of -msgid "The reason for editing this category. Shows up on the audit log." -msgstr "" - -#: discord.CategoryChannel.edit:23 of -msgid "If position is less than 0 or greater than the number of categories." -msgstr "" - -#: discord.CategoryChannel.edit:24 of -#, fuzzy -msgid "You do not have permissions to edit the category." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.CategoryChannel.edit:25 of -#, fuzzy -msgid "Editing the category failed." -msgstr "カテゴリの名前を返します。" - -#: discord.CategoryChannel.channels:1 of -msgid "Returns the channels that are under this category." -msgstr "" - -#: discord.CategoryChannel.channels:3 of -msgid "" -"These are sorted by the official Discord UI, which places voice channels " -"below the text channels." -msgstr "" - -#: discord.CategoryChannel.text_channels:1 of -msgid "Returns the text channels that are under this category." -msgstr "" - -#: discord.CategoryChannel.voice_channels:1 of -msgid "Returns the voice channels that are under this category." -msgstr "" - -#: discord.CategoryChannel.create_text_channel:3 of -msgid "" -"A shortcut method to :meth:`Guild.create_text_channel` to create a " -":class:`TextChannel` in the category." -msgstr "" - -#: discord.CategoryChannel.create_voice_channel:3 of -msgid "" -"A shortcut method to :meth:`Guild.create_voice_channel` to create a " -":class:`VoiceChannel` in the category." -msgstr "" - -#: ../../api.rst:2748 -msgid "DMChannel" -msgstr "" - -#: discord.DMChannel:1 of -msgid "Represents a Discord direct message channel." -msgstr "" - -#: discord.DMChannel:19 discord.GroupChannel:19 of -msgid "Returns a string representation of the channel" -msgstr "" - -#: discord.DMChannel:23 of -msgid "The user you are participating with in the direct message channel." -msgstr "" - -#: discord.DMChannel:35 of -#, fuzzy -msgid "The direct message channel ID." -msgstr "削除されたメッセージ。" - -#: discord.DMChannel.created_at:1 of -msgid "Returns the direct message channel's creation time in UTC." -msgstr "" - -#: discord.DMChannel.permissions_for:1 discord.GroupChannel.permissions_for:1 -#: of -msgid "Handles permission resolution for a :class:`User`." -msgstr "" - -#: discord.DMChannel.permissions_for:3 discord.GroupChannel.permissions_for:3 -#: of -msgid "This function is there for compatibility with other channel types." -msgstr "" - -#: discord.DMChannel.permissions_for:5 discord.GroupChannel.permissions_for:5 -#: of -msgid "Actual direct messages do not really have the concept of permissions." -msgstr "" - -#: discord.DMChannel.permissions_for:7 discord.GroupChannel.permissions_for:7 -#: of -msgid "This returns all the Text related permissions set to ``True`` except:" -msgstr "" - -#: discord.DMChannel.permissions_for:9 of -msgid "" -":attr:`~Permissions.send_tts_messages`: You cannot send TTS messages in a" -" DM." -msgstr "" - -#: discord.DMChannel.permissions_for:10 of -msgid "" -":attr:`~Permissions.manage_messages`: You cannot delete others messages " -"in a DM." -msgstr "" - -#: discord.DMChannel.permissions_for:12 of -msgid "" -"The user to check permissions for. This parameter is ignored but kept for" -" compatibility." -msgstr "" - -#: discord.DMChannel.permissions_for:16 of -msgid "The resolved permissions." -msgstr "" - -#: ../../api.rst:2762 -msgid "GroupChannel" -msgstr "" - -#: discord.GroupChannel:1 of -msgid "Represents a Discord group channel." -msgstr "" - -#: discord.GroupChannel:23 of -msgid "The users you are participating with in the group channel." -msgstr "" - -#: discord.GroupChannel:35 of -#, fuzzy -msgid "The group channel ID." -msgstr "新しいグループチャンネル。" - -#: discord.GroupChannel:41 of -#, fuzzy -msgid "The user that owns the group channel." -msgstr "新しいグループチャンネル。" - -#: discord.GroupChannel:47 of -#, fuzzy -msgid "The group channel's icon hash if provided." -msgstr "更新されたグループチャンネルの更新前情報。" - -#: discord.GroupChannel:53 of -#, fuzzy -msgid "The group channel's name if provided." -msgstr "更新されたグループチャンネルの更新後情報。" - -#: discord.GroupChannel.icon_url:1 of -msgid "Returns the channel's icon asset if available." -msgstr "" - -#: discord.GroupChannel.permissions_for:9 of -msgid "send_tts_messages: You cannot send TTS messages in a DM." -msgstr "" - -#: discord.GroupChannel.permissions_for:10 of -msgid "manage_messages: You cannot delete others messages in a DM." -msgstr "" - -#: discord.GroupChannel.permissions_for:12 of -msgid "This also checks the kick_members permission if the user is the owner." -msgstr "" - -#: discord.GroupChannel.permissions_for:14 of -msgid "The user to check permissions for." -msgstr "" - -#: discord.GroupChannel.permissions_for:17 of -msgid "The resolved permissions for the user." -msgstr "" - -#: discord.GroupChannel.add_recipients:3 of -msgid "Adds recipients to this group." -msgstr "" - -#: discord.GroupChannel.add_recipients:5 of -msgid "" -"A group can only have a maximum of 10 members. Attempting to add more " -"ends up in an exception. To add a recipient to the group, you must have a" -" relationship with the user of type :attr:`RelationshipType.friend`." -msgstr "" - -#: discord.GroupChannel.add_recipients:10 of -msgid "An argument list of users to add to this group." -msgstr "" - -#: discord.GroupChannel.add_recipients:13 of -msgid "Adding a recipient to this group failed." -msgstr "" - -#: discord.GroupChannel.remove_recipients:3 of -msgid "Removes recipients from this group." -msgstr "" - -#: discord.GroupChannel.remove_recipients:5 of -msgid "An argument list of users to remove from this group." -msgstr "" - -#: discord.GroupChannel.remove_recipients:8 of -msgid "Removing a recipient from this group failed." -msgstr "" - -#: discord.GroupChannel.edit:3 of -msgid "Edits the group." -msgstr "" - -#: discord.GroupChannel.edit:5 of -msgid "The new name to change the group to. Could be ``None`` to remove the name." -msgstr "" - -#: discord.GroupChannel.edit:8 of -msgid "" -"A :term:`py:bytes-like object` representing the new icon. Could be " -"``None`` to remove the icon." -msgstr "" - -#: discord.GroupChannel.edit:12 of -msgid "Editing the group failed." -msgstr "" - -#: discord.GroupChannel.leave:3 of -msgid "Leave the group." -msgstr "" - -#: discord.GroupChannel.leave:5 of -msgid "If you are the only one in the group, this deletes it as well." -msgstr "" - -#: discord.GroupChannel.leave:7 of -msgid "Leaving the group failed." -msgstr "" - -#: ../../api.rst:2776 -msgid "PartialInviteGuild" -msgstr "" - -#: discord.PartialInviteGuild:1 of -msgid "Represents a \"partial\" invite guild." -msgstr "" - -#: discord.PartialInviteChannel:3 discord.PartialInviteGuild:3 of -msgid "" -"This model will be given when the user is not part of the guild the " -":class:`Invite` resolves to." -msgstr "" - -#: discord.PartialInviteGuild:10 of -msgid "Checks if two partial guilds are the same." -msgstr "" - -#: discord.PartialInviteGuild:14 of -msgid "Checks if two partial guilds are not the same." -msgstr "" - -#: discord.PartialInviteGuild:18 of -msgid "Return the partial guild's hash." -msgstr "" - -#: discord.PartialInviteGuild:22 of -msgid "Returns the partial guild's name." -msgstr "" - -#: discord.PartialInviteGuild:26 of -msgid "The partial guild's name." -msgstr "" - -#: discord.PartialInviteGuild:32 of -#, fuzzy -msgid "The partial guild's ID." -msgstr "ギルドのウィジェット。" - -#: discord.PartialInviteGuild:38 of -msgid "The partial guild's verification level." -msgstr "" - -#: discord.PartialInviteGuild:44 of -msgid "" -"A list of features the guild has. See :attr:`Guild.features` for more " -"information." -msgstr "" - -#: discord.PartialInviteGuild:50 of -msgid "The partial guild's icon." -msgstr "" - -#: discord.PartialInviteGuild:56 of -msgid "The partial guild's banner." -msgstr "" - -#: discord.PartialInviteGuild:62 of -#, fuzzy -msgid "The partial guild's invite splash." -msgstr "ギルドの招待時のスプラッシュ画像の変更" - -#: discord.PartialInviteGuild:68 of -msgid "The partial guild's description." -msgstr "" - -#: discord.PartialInviteGuild.is_icon_animated:1 of -msgid ":class:`bool`: Returns ``True`` if the guild has an animated icon." -msgstr "" - -#: discord.PartialInviteGuild.icon_url_as:1 of -msgid "The same operation as :meth:`Guild.icon_url_as`." -msgstr "" - -#: discord.PartialInviteGuild.banner_url_as:1 of -msgid "The same operation as :meth:`Guild.banner_url_as`." -msgstr "" - -#: discord.PartialInviteGuild.splash_url_as:1 of -msgid "The same operation as :meth:`Guild.splash_url_as`." -msgstr "" - -#: ../../api.rst:2782 -msgid "PartialInviteChannel" -msgstr "" - -#: discord.PartialInviteChannel:1 of -msgid "Represents a \"partial\" invite channel." -msgstr "" - -#: discord.PartialInviteChannel:10 discord.WidgetChannel:7 of -msgid "Checks if two partial channels are the same." -msgstr "" - -#: discord.PartialInviteChannel:14 discord.WidgetChannel:11 of -msgid "Checks if two partial channels are not the same." -msgstr "" - -#: discord.PartialInviteChannel:18 discord.WidgetChannel:15 of -msgid "Return the partial channel's hash." -msgstr "" - -#: discord.PartialInviteChannel:22 discord.WidgetChannel:19 of -msgid "Returns the partial channel's name." -msgstr "" - -#: discord.PartialInviteChannel:26 of -#, fuzzy -msgid "The partial channel's name." -msgstr "更新されたギルドの更新後情報。" - -#: discord.PartialInviteChannel:32 of -#, fuzzy -msgid "The partial channel's ID." -msgstr "更新されたギルドの更新前情報。" - -#: discord.PartialInviteChannel:38 of -#, fuzzy -msgid "The partial channel's type." -msgstr "更新されたギルドの更新後情報。" - -#: ../../api.rst:2788 -msgid "Invite" -msgstr "" - -#: discord.Invite:1 of -msgid "Represents a Discord :class:`Guild` or :class:`abc.GuildChannel` invite." -msgstr "" - -#: discord.Invite:10 of -msgid "Checks if two invites are equal." -msgstr "" - -#: discord.Invite:14 of -msgid "Checks if two invites are not equal." -msgstr "" - -#: discord.Invite:18 of -msgid "Returns the invite hash." -msgstr "" - -#: discord.Invite:22 of -msgid "Returns the invite URL." -msgstr "" - -#: discord.Invite:24 of -msgid "The following table illustrates what methods will obtain the attributes:" -msgstr "" - -#: discord.Invite:27 of -msgid "Attribute" -msgstr "" - -#: discord.Invite:27 of -msgid "Method" -msgstr "" - -#: discord.Invite:29 of -msgid ":attr:`max_age`" -msgstr ":attr:`max_age`" - -#: discord.Invite:29 discord.Invite:31 discord.Invite:33 discord.Invite:35 -#: discord.Invite:37 of -msgid ":meth:`abc.GuildChannel.invites`\\, :meth:`Guild.invites`" -msgstr "" - -#: discord.Invite:31 of -msgid ":attr:`max_uses`" -msgstr ":attr:`max_uses`" - -#: discord.Invite:33 of -msgid ":attr:`created_at`" -msgstr ":attr:`created_at`" - -#: discord.Invite:35 of -msgid ":attr:`temporary`" -msgstr ":attr:`temporary`" - -#: discord.Invite:37 of -msgid ":attr:`uses`" -msgstr ":attr:`uses`" - -#: discord.Invite:39 of -msgid ":attr:`approximate_member_count`" -msgstr ":attr:`approximate_member_count`" - -#: discord.Invite:39 discord.Invite:41 of -msgid ":meth:`Client.fetch_invite`" -msgstr "" - -#: discord.Invite:41 of -msgid ":attr:`approximate_presence_count`" -msgstr ":attr:`approximate_presence_count`" - -#: discord.Invite:44 of -msgid "If it's not in the table above then it is available by all methods." -msgstr "" - -#: discord.Invite:48 of -msgid "" -"How long the before the invite expires in seconds. A value of 0 indicates" -" that it doesn't expire." -msgstr "" - -#: discord.Invite:54 of -msgid "The URL fragment used for the invite." -msgstr "" - -#: discord.Invite:60 of -msgid "" -"The guild the invite is for. Can be ``None`` if it's from a group direct " -"message." -msgstr "" - -#: discord.Invite:62 of -msgid "" -"Optional[Union[:class:`Guild`, :class:`Object`, " -":class:`PartialInviteGuild`]]" -msgstr "" - -#: discord.Invite:66 of -#, fuzzy -msgid "Indicates if the invite has been revoked." -msgstr "opusライブラリがロードされているかを表します。" - -#: discord.Invite:72 of -msgid "A datetime object denoting the time the invite was created." -msgstr "" - -#: discord.Invite:78 of -msgid "" -"Indicates that the invite grants temporary membership. If ``True``, " -"members who joined via this invite will be kicked upon disconnect." -msgstr "" - -#: discord.Invite:85 of -msgid "How many times the invite has been used." -msgstr "" - -#: discord.Invite:91 of -msgid "How many times the invite can be used." -msgstr "" - -#: discord.Invite:103 of -msgid "The approximate number of members in the guild." -msgstr "" - -#: discord.Invite:109 of -msgid "" -"The approximate number of members currently active in the guild. This " -"includes idle, dnd, online, and invisible members. Offline members are " -"excluded." -msgstr "" - -#: discord.Invite:116 of -#, fuzzy -msgid "The channel the invite is for." -msgstr "権限を確認したいチャンネル。" - -#: discord.Invite:118 of -#, fuzzy -msgid "" -"Union[:class:`abc.GuildChannel`, :class:`Object`, " -":class:`PartialInviteChannel`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: discord.Invite.id:1 of -msgid "Returns the proper code portion of the invite." -msgstr "" - -#: discord.Invite.url:1 of -msgid "A property that retrieves the invite URL." -msgstr "" - -#: discord.Invite.delete:3 of -msgid "Revokes the instant invite." -msgstr "" - -#: discord.Invite.delete:5 of -msgid "" -"You must have the :attr:`~Permissions.manage_channels` permission to do " -"this." -msgstr "" - -#: discord.Invite.delete:7 of -msgid "The reason for deleting this invite. Shows up on the audit log." -msgstr "" - -#: ../../api.rst:2794 -msgid "Template" -msgstr "" - -#: discord.Template:1 of -#, fuzzy -msgid "Represents a Discord template." -msgstr "Discordの埋め込みを表します。" - -#: discord.Template:13 of -msgid "How many times the template has been used." -msgstr "" - -#: discord.Template:19 of -#, fuzzy -msgid "The name of the template." -msgstr "フィールドの名前。" - -#: discord.Template:25 of -#, fuzzy -msgid "The description of the template." -msgstr "更新後のメッセージ。" - -#: discord.Template:31 of -#, fuzzy -msgid "The creator of the template." -msgstr "リアクションの現在の状態。" - -#: discord.Template:37 of -#, fuzzy -msgid "When the template was created." -msgstr "新しい役職の作成。" - -#: discord.Template:43 of -msgid "" -"When the template was last updated (referred to as \"last synced\" in the" -" client)." -msgstr "" - -#: discord.Template:49 of -#, fuzzy -msgid "The source guild." -msgstr "ギルドのID。" - -#: discord.Template.create_guild:3 of -#, fuzzy -msgid "Creates a :class:`.Guild` using the template." -msgstr ":class:`.Guild` を作成します。" - -#: ../../api.rst:2800 -msgid "WidgetChannel" -msgstr "" - -#: discord.WidgetChannel:1 of -msgid "Represents a \"partial\" widget channel." -msgstr "" - -#: discord.WidgetChannel:23 of -#, fuzzy -msgid "The channel's ID." -msgstr "テキストチャンネル。" - -#: discord.WidgetChannel:35 of -msgid "The channel's position" -msgstr "" - -#: ../../api.rst:2806 -msgid "WidgetMember" -msgstr "" - -#: discord.WidgetMember:1 of -msgid "Represents a \"partial\" member of the widget's guild." -msgstr "" - -#: discord.WidgetMember:7 of -msgid "Checks if two widget members are the same." -msgstr "" - -#: discord.WidgetMember:11 of -msgid "Checks if two widget members are not the same." -msgstr "" - -#: discord.WidgetMember:15 of -msgid "Return the widget member's hash." -msgstr "" - -#: discord.WidgetMember:19 of -msgid "Returns the widget member's `name#discriminator`." -msgstr "" - -#: discord.WidgetMember:23 of -#, fuzzy -msgid "The member's ID." -msgstr "メンバーメンバーが退席中。" - -#: discord.WidgetMember:29 of -#, fuzzy -msgid "The member's username." -msgstr "メンバーがオンライン。" - -#: discord.WidgetMember:35 of -#, fuzzy -msgid "The member's discriminator." -msgstr "ユーザー名とディスクリミネータを返します。" - -#: discord.WidgetMember:41 of -#, fuzzy -msgid "Whether the member is a bot." -msgstr "メンバーがオンライン。" - -#: discord.WidgetMember:47 of -#, fuzzy -msgid "The member's status." -msgstr "メンバーメンバーが退席中。" - -#: discord.WidgetMember:53 of -#, fuzzy -msgid "The member's nickname." -msgstr "メンバーがオンライン。" - -#: discord.WidgetMember:59 of -msgid "The member's avatar hash." -msgstr "" - -#: discord.WidgetMember:65 of -#, fuzzy -msgid "The member's activity." -msgstr "メンバーメンバーが退席中。" - -#: discord.WidgetMember:67 of -msgid "Optional[Union[:class:`BaseActivity`, :class:`Spotify`]]" -msgstr "" - -#: discord.WidgetMember:71 of -msgid "Whether the member is currently deafened." -msgstr "" - -#: discord.WidgetMember:77 of -msgid "Whether the member is currently muted." -msgstr "" - -#: discord.WidgetMember:83 of -msgid "Whether the member is currently being suppressed." -msgstr "" - -#: discord.WidgetMember:89 of -#, fuzzy -msgid "Which channel the member is connected to." -msgstr "ボイスチャンネルに接続しているかどうかを表します。" - -#: discord.WidgetMember.display_name:1 of -#, fuzzy -msgid "Returns the member's display name." -msgstr "役職の名前を返します。" - -#: ../../api.rst:2813 -msgid "Widget" -msgstr "" - -#: discord.Widget:1 of -msgid "Represents a :class:`Guild` widget." -msgstr "" - -#: discord.Widget:7 of -msgid "Checks if two widgets are the same." -msgstr "" - -#: discord.Widget:11 of -msgid "Checks if two widgets are not the same." -msgstr "" - -#: discord.Widget:15 of -msgid "Returns the widget's JSON URL." -msgstr "" - -#: discord.Widget:25 of -#, fuzzy -msgid "The guild's name." -msgstr "ギルドのウィジェット。" - -#: discord.Widget:31 of -msgid "The accessible voice channels in the guild." -msgstr "" - -#: discord.Widget:33 of -msgid "Optional[List[:class:`WidgetChannel`]]" -msgstr "" - -#: discord.Widget:37 of -msgid "" -"The online members in the server. Offline members do not appear in the " -"widget." -msgstr "" - -#: discord.Widget:42 of -msgid "" -"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." -msgstr "" - -#: discord.Widget:47 of -msgid "Optional[List[:class:`Member`]]" -msgstr "" - -#: discord.Widget.created_at:1 of -msgid "Returns the member's creation time in UTC." -msgstr "" - -#: discord.Widget.json_url:1 of -#, fuzzy -msgid "The JSON URL of the widget." -msgstr "フィールドの名前。" - -#: discord.Widget.invite_url:1 of -msgid "The invite URL for the guild, if available." -msgstr "" - -#: discord.Widget.fetch_invite:3 of -msgid "" -"Retrieves an :class:`Invite` from a invite URL or ID. This is the same as" -" :meth:`Client.fetch_invite`; the invite code is abstracted away." -msgstr "" - -#: discord.Widget.fetch_invite:7 of -msgid "" -"Whether to include count information in the invite. This fills the " -":attr:`Invite.approximate_member_count` and " -":attr:`Invite.approximate_presence_count` fields." -msgstr "" - -#: ../../api.rst:2819 -msgid "MessageReference" -msgstr "" - -#: discord.MessageReference:1 of -msgid "Represents a reference to a :class:`Message`." -msgstr "" - -#: discord.MessageReference:7 of -msgid "The id of the message referenced." -msgstr "" - -#: discord.MessageReference:13 of -#, fuzzy -msgid "The channel id of the message referenced." -msgstr "更新後のメッセージ。" - -#: discord.MessageReference:19 of -msgid "The guild id of the message referenced." -msgstr "" - -#: discord.MessageReference.cached_message:1 discord.RawMessageDeleteEvent:23 -#: discord.RawMessageUpdateEvent:25 of -msgid "The cached message, if found in the internal message cache." -msgstr "" - -#: ../../api.rst:2824 -msgid "RawMessageDeleteEvent" -msgstr "" - -#: discord.RawMessageDeleteEvent:1 of -msgid "Represents the event payload for a :func:`on_raw_message_delete` event." -msgstr "" - -#: discord.RawMessageDeleteEvent:5 of -msgid "The channel ID where the deletion took place." -msgstr "" - -#: discord.RawMessageDeleteEvent:11 of -msgid "The guild ID where the deletion took place, if applicable." -msgstr "" - -#: discord.RawMessageDeleteEvent:17 of -#, fuzzy -msgid "The message ID that got deleted." -msgstr "削除されたメッセージのリスト。" - -#: ../../api.rst:2830 -msgid "RawBulkMessageDeleteEvent" -msgstr "" - -#: discord.RawBulkMessageDeleteEvent:1 of -msgid "" -"Represents the event payload for a :func:`on_raw_bulk_message_delete` " -"event." -msgstr "" - -#: discord.RawBulkMessageDeleteEvent:5 of -#, fuzzy -msgid "A :class:`set` of the message IDs that were deleted." -msgstr "削除されたメッセージのリスト。" - -#: discord.RawBulkMessageDeleteEvent:7 of -#, fuzzy -msgid "Set[:class:`int`]" -msgstr ":class:`str`" - -#: discord.RawBulkMessageDeleteEvent:11 of -msgid "The channel ID where the message got deleted." -msgstr "" - -#: discord.RawBulkMessageDeleteEvent:17 of -msgid "The guild ID where the message got deleted, if applicable." -msgstr "" - -#: discord.RawBulkMessageDeleteEvent:23 of -msgid "The cached messages, if found in the internal message cache." -msgstr "" - -#: discord.RawBulkMessageDeleteEvent:25 of -#, fuzzy -msgid "List[:class:`Message`]" -msgstr ":class:`bytes`" - -#: ../../api.rst:2836 -msgid "RawMessageUpdateEvent" -msgstr "" - -#: discord.RawMessageUpdateEvent:1 of -msgid "Represents the payload for a :func:`on_raw_message_edit` event." -msgstr "" - -#: discord.RawMessageUpdateEvent:5 of -#, fuzzy -msgid "The message ID that got updated." -msgstr "Banが解除されたユーザー。" - -#: discord.RawMessageUpdateEvent:11 of -msgid "The channel ID where the update took place." -msgstr "" - -#: discord.RawMessageUpdateEvent:19 of -#, fuzzy -msgid "" -"The raw data given by the `gateway " -"`_" -msgstr "" -"このイベントの性質は、本質的に生表現のため、データのパラメータは `ゲートウェイ " -"`_ " -"によって与えられた生データと一致します。" - -#: ../../api.rst:2842 -msgid "RawReactionActionEvent" -msgstr "" - -#: discord.RawReactionActionEvent:1 of -msgid "" -"Represents the payload for a :func:`on_raw_reaction_add` or " -":func:`on_raw_reaction_remove` event." -msgstr "" - -#: discord.RawReactionActionEvent:6 of -#, fuzzy -msgid "The message ID that got or lost a reaction." -msgstr "リアクションが削除されたメッセージ。" - -#: discord.RawReactionActionEvent:12 of -#, fuzzy -msgid "The user ID who added the reaction or whose reaction was removed." -msgstr "リアクションを追加したユーザー。" - -#: discord.RawReactionActionEvent:18 of -#, fuzzy -msgid "The channel ID where the reaction got added or removed." -msgstr "作成、または削除されたギルドチャンネル。" - -#: discord.RawReactionActionEvent:24 of -msgid "The guild ID where the reaction got added or removed, if applicable." -msgstr "" - -#: discord.RawReactionActionEvent:30 of -msgid "The custom or unicode emoji being used." -msgstr "" - -#: discord.RawReactionActionEvent:32 discord.RawReactionClearEmojiEvent:27 of -#, fuzzy -msgid ":class:`PartialEmoji`" -msgstr ":class:`.Profile`" - -#: discord.RawReactionActionEvent:36 of -msgid "" -"The member who added the reaction. Only available if `event_type` is " -"`REACTION_ADD` and the reaction is inside a guild." -msgstr "" - -#: discord.RawReactionActionEvent:44 of -msgid "" -"The event type that triggered this action. Can be ``REACTION_ADD`` for " -"reaction addition or ``REACTION_REMOVE`` for reaction removal." -msgstr "" - -#: ../../api.rst:2848 -msgid "RawReactionClearEvent" -msgstr "" - -#: discord.RawReactionClearEvent:1 of -msgid "Represents the payload for a :func:`on_raw_reaction_clear` event." -msgstr "" - -#: discord.RawReactionClearEmojiEvent:7 discord.RawReactionClearEvent:5 of -#, fuzzy -msgid "The message ID that got its reactions cleared." -msgstr "リアクションが削除されたメッセージ。" - -#: discord.RawReactionClearEmojiEvent:13 discord.RawReactionClearEvent:11 of -#, fuzzy -msgid "The channel ID where the reactions got cleared." -msgstr "リアクションが削除されたメッセージ。" - -#: discord.RawReactionClearEmojiEvent:19 discord.RawReactionClearEvent:17 of -#, fuzzy -msgid "The guild ID where the reactions got cleared." -msgstr "作成、または削除されたギルドチャンネル。" - -#: ../../api.rst:2854 -msgid "RawReactionClearEmojiEvent" -msgstr "" - -#: discord.RawReactionClearEmojiEvent:1 of -msgid "Represents the payload for a :func:`on_raw_reaction_clear_emoji` event." -msgstr "" - -#: discord.RawReactionClearEmojiEvent:25 of -msgid "The custom or unicode emoji being removed." -msgstr "" - -#: ../../api.rst:2863 -msgid "Data Classes" -msgstr "データクラス" - -#: ../../api.rst:2865 -msgid "Some classes are just there to be data containers, this lists them." -msgstr "" - -#: ../../api.rst:2867 -msgid "" -"Unlike :ref:`models ` you are allowed to create most " -"of these yourself, even if they can also be used to hold attributes." -msgstr "" - -#: ../../api.rst:2873 -msgid "" -"The only exception to this rule is :class:`abc.Snowflake`, which is made " -"with dynamic attributes in mind." -msgstr "" - -#: ../../api.rst:2878 -msgid "Object" -msgstr "" - -#: discord.Object:1 of -msgid "Represents a generic Discord object." -msgstr "" - -#: discord.Object:3 of -msgid "" -"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." -msgstr "" - -#: discord.Object:9 of -msgid "" -"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." -msgstr "" - -#: discord.Object:18 of -msgid "Checks if two objects are equal." -msgstr "二つのオブジェクトが等しいか比較します。" - -#: discord.Object:22 of -msgid "Checks if two objects are not equal." -msgstr "二つのオブジェクトが等しいものでないか比較します。" - -#: discord.Object:26 of -msgid "Returns the object's hash." -msgstr "オブジェクトのハッシュを返します。" - -#: discord.Object:30 of -#, fuzzy -msgid "The ID of the object." -msgstr "ユーザーのプロフィール。" - -#: discord.Object.created_at:1 of -#, fuzzy -msgid "Returns the snowflake's creation time in UTC." -msgstr "役職の名前を返します。" - -#: ../../api.rst:2884 -msgid "Embed" -msgstr "" - -#: discord.Embed:1 of -msgid "Represents a Discord embed." -msgstr "Discordの埋め込みを表します。" - -#: discord.Embed:7 of -msgid "" -"Returns the total size of the embed. Useful for checking if it's within " -"the 6000 character limit." -msgstr "" - -#: discord.Embed:10 of -msgid "" -"Certain properties return an ``EmbedProxy``, a type that acts similar to " -"a regular :class:`dict` except using dotted access, e.g. " -"``embed.author.icon_url``. If the attribute is invalid or empty, then a " -"special sentinel value is returned, :attr:`Embed.Empty`." -msgstr "" - -#: discord.Embed:16 of -msgid "" -"For ease of use, all parameters that expect a :class:`str` are implicitly" -" casted to :class:`str` for you." -msgstr "使いやすさを考慮して、strが渡されることを想定されたすべてのパラメータは、暗黙的にstrにキャストされます。" - -#: discord.Embed:21 of -msgid "The title of the embed. This can be set during initialisation." -msgstr "" - -#: discord.Embed:28 of -msgid "" -"The type of embed. Usually \"rich\". This can be set during " -"initialisation." -msgstr "" - -#: discord.Embed:35 of -msgid "The description of the embed. This can be set during initialisation." -msgstr "" - -#: discord.Embed:42 of -msgid "The URL of the embed. This can be set during initialisation." -msgstr "" - -#: discord.Embed:49 of -msgid "" -"The timestamp of the embed content. This could be a naive or aware " -"datetime." -msgstr "" - -#: discord.Embed:55 of -msgid "" -"The colour code of the embed. Aliased to ``color`` as well. This can be " -"set during initialisation." -msgstr "" - -#: discord.Embed:58 of -#, fuzzy -msgid "Union[:class:`Colour`, :class:`int`]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: discord.Embed:62 of -msgid "" -"A special sentinel value used by ``EmbedProxy`` and this class to denote " -"that the value or attribute is empty." -msgstr "" - -#: discord.Embed.from_dict:1 of -msgid "" -"Converts a :class:`dict` to a :class:`Embed` provided it is in the format" -" that Discord expects it to be in." -msgstr "" - -#: discord.Embed.from_dict:4 of -msgid "" -"You can find out about this format in the `official Discord " -"documentation`__." -msgstr "" - -#: discord.Embed.from_dict:10 of -msgid "The dictionary to convert into an embed." -msgstr "" - -#: discord.Embed.copy:1 of -msgid "Returns a shallow copy of the embed." -msgstr "" - -#: discord.Embed.footer:1 of -msgid "Returns an ``EmbedProxy`` denoting the footer contents." -msgstr "" - -#: discord.Embed.footer:3 of -msgid "See :meth:`set_footer` for possible values you can access." -msgstr "" - -#: discord.Embed.author:5 discord.Embed.fields:5 discord.Embed.footer:5 -#: discord.Embed.image:10 discord.Embed.provider:5 discord.Embed.thumbnail:10 -#: discord.Embed.video:9 of -msgid "If the attribute has no value then :attr:`Empty` is returned." -msgstr "" - -#: discord.Embed.author:7 discord.Embed.footer:7 discord.Embed.image:12 -#: discord.Embed.provider:7 discord.Embed.thumbnail:12 discord.Embed.video:11 -#: of -msgid "Union[:class:`EmbedProxy`, :attr:`Empty`]" -msgstr "" - -#: discord.Embed.set_footer:1 of -msgid "Sets the footer for the embed content." -msgstr "" - -#: discord.Embed.add_field:3 discord.Embed.insert_field_at:3 -#: discord.Embed.remove_author:3 discord.Embed.set_author:3 -#: discord.Embed.set_field_at:5 discord.Embed.set_footer:3 -#: discord.Embed.set_image:3 discord.Embed.set_thumbnail:3 of -msgid "" -"This function returns the class instance to allow for fluent-style " -"chaining." -msgstr "" - -#: discord.Embed.set_footer:6 of -msgid "The footer text." -msgstr "フッターテキスト。" - -#: discord.Embed.set_footer:8 of -msgid "The URL of the footer icon. Only HTTP(S) is supported." -msgstr "" - -#: discord.Embed.image:1 of -msgid "Returns an ``EmbedProxy`` denoting the image contents." -msgstr "" - -#: discord.Embed.image:3 discord.Embed.thumbnail:3 of -msgid "Possible attributes you can access are:" -msgstr "" - -#: discord.Embed.image:5 discord.Embed.thumbnail:5 of -msgid "``url``" -msgstr "" - -#: discord.Embed.image:6 discord.Embed.thumbnail:6 of -msgid "``proxy_url``" -msgstr "" - -#: discord.Embed.image:7 discord.Embed.thumbnail:7 of -msgid "``width``" -msgstr "" - -#: discord.Embed.image:8 discord.Embed.thumbnail:8 of -msgid "``height``" -msgstr "" - -#: discord.Embed.set_image:1 of -msgid "Sets the image for the embed content." -msgstr "" - -#: discord.Embed.set_image:6 of -msgid "Passing :attr:`Empty` removes the image." -msgstr "" - -#: discord.Embed.set_image:9 of -msgid "The source URL for the image. Only HTTP(S) is supported." -msgstr "" - -#: discord.Embed.thumbnail:1 of -msgid "Returns an ``EmbedProxy`` denoting the thumbnail contents." -msgstr "" - -#: discord.Embed.set_thumbnail:1 of -msgid "Sets the thumbnail for the embed content." -msgstr "" - -#: discord.Embed.set_thumbnail:6 of -msgid "Passing :attr:`Empty` removes the thumbnail." -msgstr "" - -#: discord.Embed.set_thumbnail:9 of -msgid "The source URL for the thumbnail. Only HTTP(S) is supported." -msgstr "" - -#: discord.Embed.video:1 of -msgid "Returns an ``EmbedProxy`` denoting the video contents." -msgstr "" - -#: discord.Embed.video:3 of -msgid "Possible attributes include:" -msgstr "" - -#: discord.Embed.video:5 of -msgid "``url`` for the video URL." -msgstr "" - -#: discord.Embed.video:6 of -msgid "``height`` for the video height." -msgstr "" - -#: discord.Embed.video:7 of -msgid "``width`` for the video width." -msgstr "" - -#: discord.Embed.provider:1 of -msgid "Returns an ``EmbedProxy`` denoting the provider contents." -msgstr "" - -#: discord.Embed.provider:3 of -msgid "The only attributes that might be accessed are ``name`` and ``url``." -msgstr "" - -#: discord.Embed.author:1 of -msgid "Returns an ``EmbedProxy`` denoting the author contents." -msgstr "" - -#: discord.Embed.author:3 of -msgid "See :meth:`set_author` for possible values you can access." -msgstr "" - -#: discord.Embed.set_author:1 of -msgid "Sets the author for the embed content." -msgstr "" - -#: discord.Embed.set_author:6 of -msgid "The name of the author." -msgstr "" - -#: discord.Embed.set_author:8 of -msgid "The URL for the author." -msgstr "" - -#: discord.Embed.set_author:10 of -msgid "The URL of the author icon. Only HTTP(S) is supported." -msgstr "" - -#: discord.Embed.remove_author:1 of -#, fuzzy -msgid "Clears embed's author information." -msgstr "Botのアプリケーション情報。" - -#: discord.Embed.fields:1 of -msgid "Returns a :class:`list` of ``EmbedProxy`` denoting the field contents." -msgstr "" - -#: discord.Embed.fields:3 of -msgid "See :meth:`add_field` for possible values you can access." -msgstr "" - -#: discord.Embed.fields:7 of -msgid "Union[List[:class:`EmbedProxy`], :attr:`Empty`]" -msgstr "" - -#: discord.Embed.add_field:1 of -msgid "Adds a field to the embed object." -msgstr "" - -#: discord.Embed.add_field:6 discord.Embed.insert_field_at:10 -#: discord.Embed.set_field_at:10 of -msgid "The name of the field." -msgstr "フィールドの名前。" - -#: discord.Embed.add_field:8 discord.Embed.insert_field_at:12 -#: discord.Embed.set_field_at:12 of -msgid "The value of the field." -msgstr "フィールドの値。" - -#: discord.Embed.add_field:10 discord.Embed.insert_field_at:14 -#: discord.Embed.set_field_at:14 of -msgid "Whether the field should be displayed inline." -msgstr "フィールドをインライン表示するかどうか。" - -#: discord.Embed.insert_field_at:1 of -msgid "Inserts a field before a specified index to the embed." -msgstr "" - -#: discord.Embed.insert_field_at:8 of -msgid "The index of where to insert the field." -msgstr "" - -#: discord.Embed.clear_fields:1 of -msgid "Removes all fields from this embed." -msgstr "埋め込みからすべてのフィールドを削除します。" - -#: discord.Embed.remove_field:1 of -msgid "Removes a field at a specified index." -msgstr "特定のインデックスのフィールドを削除します。" - -#: discord.Embed.remove_field:3 of -msgid "" -"If the index is invalid or out of bounds then the error is silently " -"swallowed." -msgstr "" - -#: discord.Embed.remove_field:8 of -msgid "" -"When deleting a field by index, the index of the other fields shift to " -"fill the gap just like a regular list." -msgstr "" - -#: discord.Embed.remove_field:11 of -msgid "The index of the field to remove." -msgstr "" - -#: discord.Embed.set_field_at:1 of -msgid "Modifies a field to the embed object." -msgstr "" - -#: discord.Embed.set_field_at:3 of -msgid "The index must point to a valid pre-existing field." -msgstr "" - -#: discord.Embed.set_field_at:8 of -msgid "The index of the field to modify." -msgstr "" - -#: discord.Embed.set_field_at:17 of -#, fuzzy -msgid "An invalid index was provided." -msgstr "招待の更新。" - -#: discord.Embed.to_dict:1 of -msgid "Converts this embed object into a dict." -msgstr "" - -#: ../../api.rst:2890 -msgid "AllowedMentions" -msgstr "" - -#: discord.AllowedMentions:1 of -msgid "A class that represents what mentions are allowed in a message." -msgstr "" - -#: discord.AllowedMentions:3 of -msgid "" -"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." -msgstr "" - -#: discord.AllowedMentions:9 of -msgid "Whether to allow everyone and here mentions. Defaults to ``True``." -msgstr "" - -#: discord.AllowedMentions:15 of -msgid "" -"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." -msgstr "" - -#: discord.AllowedMentions:21 discord.AllowedMentions:31 of -#, fuzzy -msgid "Union[:class:`bool`, List[:class:`abc.Snowflake`]]" -msgstr "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" - -#: discord.AllowedMentions:25 of -msgid "" -"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." -msgstr "" - -#: discord.AllowedMentions.all:1 of -msgid "" -"A factory method that returns a :class:`AllowedMentions` with all fields " -"explicitly set to ``True``" -msgstr "" - -#: discord.AllowedMentions.none:1 of -msgid "" -"A factory method that returns a :class:`AllowedMentions` with all fields " -"set to ``False``" -msgstr "" - -#: ../../api.rst:2896 -#, fuzzy -msgid "Intents" -msgstr "クライアント" - -#: discord.Intents:1 of -msgid "Wraps up a Discord gateway intent flag." -msgstr "" - -#: discord.Intents:3 of -msgid "" -"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." -msgstr "" - -#: discord.Intents:7 discord.MemberCacheFlags:12 discord.SystemChannelFlags:7 -#: of -msgid "" -"To construct an object you can pass keyword arguments denoting the flags " -"to enable or disable." -msgstr "" - -#: discord.Intents:10 of -msgid "" -"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`." -msgstr "" - -#: discord.Intents:20 discord.MemberCacheFlags:23 discord.MessageFlags:9 -#: discord.SystemChannelFlags:14 of -msgid "Checks if two flags are equal." -msgstr "" - -#: discord.Intents:23 discord.MemberCacheFlags:26 discord.MessageFlags:12 -#: discord.SystemChannelFlags:17 of -msgid "Checks if two flags are not equal." -msgstr "" - -#: discord.Intents:26 discord.MemberCacheFlags:29 discord.MessageFlags:15 -#: discord.PublicUserFlags:13 discord.SystemChannelFlags:20 of -msgid "Return the flag's hash." -msgstr "" - -#: discord.Intents:29 discord.MemberCacheFlags:32 discord.MessageFlags:18 -#: discord.SystemChannelFlags:23 of -msgid "" -"Returns an iterator of ``(name, value)`` pairs. This allows it to be, for" -" example, constructed as a dict or a list of pairs." -msgstr "" - -#: discord.Intents:34 discord.MemberCacheFlags:37 of -msgid "" -"The raw value. You should query flags via the properties rather than " -"using this raw value." -msgstr "" - -#: discord.Intents.all:1 of -msgid "A factory method that creates a :class:`Intents` with everything enabled." -msgstr "" - -#: discord.Intents.none:1 of -msgid "A factory method that creates a :class:`Intents` with everything disabled." -msgstr "" - -#: discord.Intents.default:1 of -msgid "" -"A factory method that creates a :class:`Intents` with everything enabled " -"except :attr:`presences` and :attr:`members`." -msgstr "" - -#: discord.Intents.guilds:1 of -msgid "Whether guild related events are enabled." -msgstr "" - -#: discord.Intents.bans:3 discord.Intents.dm_messages:5 -#: discord.Intents.dm_reactions:5 discord.Intents.dm_typing:5 -#: discord.Intents.emojis:3 discord.Intents.guild_messages:5 -#: discord.Intents.guild_reactions:5 discord.Intents.guild_typing:5 -#: discord.Intents.guilds:3 discord.Intents.integrations:3 -#: discord.Intents.invites:3 discord.Intents.members:3 -#: discord.Intents.messages:5 discord.Intents.presences:3 -#: discord.Intents.reactions:5 discord.Intents.typing:5 -#: discord.Intents.voice_states:3 discord.Intents.webhooks:3 of -msgid "This corresponds to the following events:" -msgstr "" - -#: discord.Intents.guilds:5 of -msgid ":func:`on_guild_join`" -msgstr "" - -#: discord.Intents.guilds:6 of -msgid ":func:`on_guild_remove`" -msgstr "" - -#: discord.Intents.guilds:7 of -msgid ":func:`on_guild_available`" -msgstr "" - -#: discord.Intents.guilds:8 of -msgid ":func:`on_guild_unavailable`" -msgstr "" - -#: discord.Intents.guilds:9 of -msgid ":func:`on_guild_channel_update`" -msgstr "" - -#: discord.Intents.guilds:10 of -msgid ":func:`on_guild_channel_create`" -msgstr "" - -#: discord.Intents.guilds:11 of -msgid ":func:`on_guild_channel_delete`" -msgstr "" - -#: discord.Intents.guilds:12 of -msgid ":func:`on_guild_channel_pins_update`" -msgstr "" - -#: discord.Intents.dm_messages:14 discord.Intents.dm_reactions:14 -#: discord.Intents.emojis:7 discord.Intents.guild_messages:13 -#: discord.Intents.guild_reactions:14 discord.Intents.guilds:14 -#: discord.Intents.members:10 discord.Intents.messages:14 -#: discord.Intents.presences:7 discord.Intents.reactions:14 -#: discord.Intents.voice_states:7 of -msgid "" -"This also corresponds to the following attributes and classes in terms of" -" cache:" -msgstr "" - -#: discord.Intents.guilds:16 of -#, fuzzy -msgid ":attr:`Client.guilds`" -msgstr ":attr:`created_at`" - -#: discord.Intents.guilds:17 of -msgid ":class:`Guild` and all its attributes." -msgstr "" - -#: discord.Intents.guilds:18 of -msgid ":meth:`Client.get_channel`" -msgstr "" - -#: discord.Intents.guilds:19 of -msgid ":meth:`Client.get_all_channels`" -msgstr "" - -#: discord.Intents.guilds:21 of -msgid "" -"It is highly advisable to leave this intent enabled for your bot to " -"function." -msgstr "" - -#: discord.Intents.members:1 of -msgid "Whether guild member related events are enabled." -msgstr "" - -#: discord.Intents.members:7 of -msgid ":func:`on_member_update` (nickname, roles)" -msgstr "" - -#: discord.Intents.members:8 of -msgid ":func:`on_user_update`" -msgstr "" - -#: discord.Intents.members:12 of -msgid ":meth:`Client.get_all_members`" -msgstr "" - -#: discord.Intents.members:13 of -msgid ":meth:`Guild.chunk`" -msgstr "" - -#: discord.Intents.members:14 of -msgid ":meth:`Guild.fetch_members`" -msgstr "" - -#: discord.Intents.members:15 of -msgid ":meth:`Guild.get_member`" -msgstr "" - -#: discord.Intents.members:16 of -#, fuzzy -msgid ":attr:`Guild.members`" -msgstr ":attr:`uses`" - -#: discord.Intents.members:17 of -#, fuzzy -msgid ":attr:`Member.roles`" -msgstr ":attr:`uses`" - -#: discord.Intents.members:18 of -#, fuzzy -msgid ":attr:`Member.nick`" -msgstr ":attr:`temporary`" - -#: discord.Intents.members:19 of -msgid ":attr:`Member.premium_since`" -msgstr "" - -#: discord.Intents.members:20 of -#, fuzzy -msgid ":attr:`User.name`" -msgstr ":attr:`uses`" - -#: discord.Intents.members:21 of -msgid "" -":attr:`User.avatar` (:meth:`User.avatar_url` and " -":meth:`User.avatar_url_as`)" -msgstr "" - -#: discord.Intents.members:22 of -#, fuzzy -msgid ":attr:`User.discriminator`" -msgstr "識別子" - -#: discord.Intents.members:24 of -msgid "" -"For more information go to the :ref:`member intent documentation " -"`." -msgstr "" - -#: discord.Intents.members:28 discord.Intents.presences:17 of -msgid "" -"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." -msgstr "" - -#: discord.Intents.bans:1 of -msgid "Whether guild ban related events are enabled." -msgstr "" - -#: discord.Intents.bans:5 of -msgid ":func:`on_member_ban`" -msgstr "" - -#: discord.Intents.bans:6 of -msgid ":func:`on_member_unban`" -msgstr "" - -#: discord.Intents.bans:8 discord.Intents.dm_typing:9 -#: discord.Intents.guild_typing:9 discord.Intents.integrations:7 -#: discord.Intents.invites:8 discord.Intents.typing:9 -#: discord.Intents.webhooks:7 of -msgid "" -"This does not correspond to any attributes or classes in the library in " -"terms of cache." -msgstr "" - -#: discord.Intents.emojis:1 of -msgid "Whether guild emoji related events are enabled." -msgstr "" - -#: discord.Intents.emojis:5 of -msgid ":func:`on_guild_emojis_update`" -msgstr "" - -#: discord.Intents.emojis:10 of -msgid ":meth:`Client.get_emoji`" -msgstr "" - -#: discord.Intents.emojis:11 of -msgid ":meth:`Client.emojis`" -msgstr "" - -#: discord.Intents.emojis:12 of -#, fuzzy -msgid ":attr:`Guild.emojis`" -msgstr ":attr:`uses`" - -#: discord.Intents.integrations:1 of -msgid "Whether guild integration related events are enabled." -msgstr "" - -#: discord.Intents.integrations:5 of -msgid ":func:`on_guild_integrations_update`" -msgstr "" - -#: discord.Intents.webhooks:1 of -msgid "Whether guild webhook related events are enabled." -msgstr "" - -#: discord.Intents.webhooks:5 of -msgid ":func:`on_webhooks_update`" -msgstr "" - -#: discord.Intents.invites:1 of -#, fuzzy -msgid "Whether guild invite related events are enabled." -msgstr "ギルドで表現のフィルターが有効ではない。" - -#: discord.Intents.invites:5 of -msgid ":func:`on_invite_create`" -msgstr "" - -#: discord.Intents.invites:6 of -msgid ":func:`on_invite_delete`" -msgstr "" - -#: discord.Intents.voice_states:1 of -msgid "Whether guild voice state related events are enabled." -msgstr "" - -#: discord.Intents.voice_states:5 of -msgid ":func:`on_voice_state_update`" -msgstr "" - -#: discord.Intents.voice_states:9 of -#, fuzzy -msgid ":attr:`VoiceChannel.members`" -msgstr ":attr:`Permissions.mute_members`" - -#: discord.Intents.voice_states:10 of -msgid ":attr:`VoiceChannel.voice_states`" -msgstr "" - -#: discord.Intents.voice_states:11 of -msgid ":attr:`Member.voice`" -msgstr "" - -#: discord.Intents.presences:1 of -#, fuzzy -msgid "Whether guild presence related events are enabled." -msgstr "ギルドで表現のフィルターが有効ではない。" - -#: discord.Intents.presences:5 of -msgid ":func:`on_member_update` (activities, status)" -msgstr "" - -#: discord.Intents.presences:9 of -msgid ":attr:`Member.activities`" -msgstr "" - -#: discord.Intents.presences:10 of -#, fuzzy -msgid ":attr:`Member.status`" -msgstr ":attr:`max_uses`" - -#: discord.Intents.presences:11 of -#, fuzzy -msgid ":attr:`Member.raw_status`" -msgstr ":attr:`max_uses`" - -#: discord.Intents.presences:13 of -msgid "" -"For more information go to the :ref:`presence intent documentation " -"`." -msgstr "" - -#: discord.Intents.messages:1 of -msgid "Whether guild and direct message related events are enabled." -msgstr "" - -#: discord.Intents.messages:3 of -msgid "" -"This is a shortcut to set or get both :attr:`guild_messages` and " -":attr:`dm_messages`." -msgstr "" - -#: discord.Intents.messages:7 of -msgid ":func:`on_message` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.messages:8 of -msgid ":func:`on_message_edit` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.messages:9 of -msgid ":func:`on_message_delete` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.messages:10 of -msgid ":func:`on_raw_message_delete` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.messages:11 of -msgid ":func:`on_raw_message_edit` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.dm_messages:12 discord.Intents.messages:12 of -msgid ":func:`on_private_channel_create`" -msgstr "" - -#: discord.Intents.messages:17 of -#, fuzzy -msgid ":attr:`Client.cached_messages`" -msgstr ":attr:`created_at`" - -#: discord.Intents.dm_messages:19 discord.Intents.guild_messages:18 -#: discord.Intents.messages:19 of -msgid "" -"Note that due to an implicit relationship this also corresponds to the " -"following events:" -msgstr "" - -#: discord.Intents.messages:21 discord.Intents.reactions:7 of -msgid ":func:`on_reaction_add` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.messages:22 discord.Intents.reactions:8 of -msgid ":func:`on_reaction_remove` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.messages:23 discord.Intents.reactions:9 of -msgid ":func:`on_reaction_clear` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.guild_messages:1 of -#, fuzzy -msgid "Whether guild message related events are enabled." -msgstr "ギルドで表現のフィルターが有効ではない。" - -#: discord.Intents.guild_messages:3 of -msgid "See also :attr:`dm_messages` for DMs or :attr:`messages` for both." -msgstr "" - -#: discord.Intents.guild_messages:7 of -msgid ":func:`on_message` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:8 of -msgid ":func:`on_message_edit` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:9 of -msgid ":func:`on_message_delete` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:10 of -msgid ":func:`on_raw_message_delete` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:11 of -msgid ":func:`on_raw_message_edit` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:16 of -msgid ":attr:`Client.cached_messages` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:20 discord.Intents.guild_reactions:7 of -msgid ":func:`on_reaction_add` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:21 discord.Intents.guild_reactions:8 of -msgid ":func:`on_reaction_remove` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_messages:22 discord.Intents.guild_reactions:9 of -msgid ":func:`on_reaction_clear` (only for guilds)" -msgstr "" - -#: discord.Intents.dm_messages:1 of -msgid "Whether direct message related events are enabled." -msgstr "" - -#: discord.Intents.dm_messages:3 of -msgid "See also :attr:`guild_messages` for guilds or :attr:`messages` for both." -msgstr "" - -#: discord.Intents.dm_messages:7 of -msgid ":func:`on_message` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:8 of -msgid ":func:`on_message_edit` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:9 of -msgid ":func:`on_message_delete` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:10 of -msgid ":func:`on_raw_message_delete` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:11 of -msgid ":func:`on_raw_message_edit` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:17 of -msgid ":attr:`Client.cached_messages` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:21 discord.Intents.dm_reactions:7 of -msgid ":func:`on_reaction_add` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:22 discord.Intents.dm_reactions:8 of -msgid ":func:`on_reaction_remove` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_messages:23 discord.Intents.dm_reactions:9 of -msgid ":func:`on_reaction_clear` (only for DMs)" -msgstr "" - -#: discord.Intents.reactions:1 of -msgid "Whether guild and direct message reaction related events are enabled." -msgstr "" - -#: discord.Intents.reactions:3 of -msgid "" -"This is a shortcut to set or get both :attr:`guild_reactions` and " -":attr:`dm_reactions`." -msgstr "" - -#: discord.Intents.reactions:10 of -msgid ":func:`on_raw_reaction_add` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.reactions:11 of -msgid ":func:`on_raw_reaction_remove` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.reactions:12 of -msgid ":func:`on_raw_reaction_clear` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.reactions:16 of -msgid ":attr:`Message.reactions` (both guild and DM messages)" -msgstr "" - -#: discord.Intents.guild_reactions:1 of -msgid "Whether guild message reaction related events are enabled." -msgstr "" - -#: discord.Intents.guild_reactions:3 of -msgid "See also :attr:`dm_reactions` for DMs or :attr:`reactions` for both." -msgstr "" - -#: discord.Intents.guild_reactions:10 of -msgid ":func:`on_raw_reaction_add` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_reactions:11 of -msgid ":func:`on_raw_reaction_remove` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_reactions:12 of -msgid ":func:`on_raw_reaction_clear` (only for guilds)" -msgstr "" - -#: discord.Intents.guild_reactions:16 of -msgid ":attr:`Message.reactions` (only for guild messages)" -msgstr "" - -#: discord.Intents.dm_reactions:1 of -msgid "Whether direct message reaction related events are enabled." -msgstr "" - -#: discord.Intents.dm_reactions:3 of -msgid "See also :attr:`guild_reactions` for guilds or :attr:`reactions` for both." -msgstr "" - -#: discord.Intents.dm_reactions:10 of -msgid ":func:`on_raw_reaction_add` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_reactions:11 of -msgid ":func:`on_raw_reaction_remove` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_reactions:12 of -msgid ":func:`on_raw_reaction_clear` (only for DMs)" -msgstr "" - -#: discord.Intents.dm_reactions:16 of -msgid ":attr:`Message.reactions` (only for DM messages)" -msgstr "" - -#: discord.Intents.dm_typing:1 discord.Intents.guild_typing:1 -#: discord.Intents.typing:1 of -msgid "Whether guild and direct message typing related events are enabled." -msgstr "" - -#: discord.Intents.typing:3 of -msgid "" -"This is a shortcut to set or get both :attr:`guild_typing` and " -":attr:`dm_typing`." -msgstr "" - -#: discord.Intents.typing:7 of -msgid ":func:`on_typing` (both guilds and DMs)" -msgstr "" - -#: discord.Intents.guild_typing:3 of -msgid "See also :attr:`dm_typing` for DMs or :attr:`typing` for both." -msgstr "" - -#: discord.Intents.guild_typing:7 of -msgid ":func:`on_typing` (only for guilds)" -msgstr "" - -#: discord.Intents.dm_typing:3 of -msgid "See also :attr:`guild_typing` for guilds or :attr:`typing` for both." -msgstr "" - -#: discord.Intents.dm_typing:7 of -msgid ":func:`on_typing` (only for DMs)" -msgstr "" - -#: ../../api.rst:2902 -msgid "MemberCacheFlags" -msgstr "" - -#: discord.MemberCacheFlags:1 of -msgid "Controls the library's cache policy when it comes to members." -msgstr "" - -#: discord.MemberCacheFlags:3 of -msgid "" -"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`." -msgstr "" - -#: discord.MemberCacheFlags:7 of -msgid "" -"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." -msgstr "" - -#: discord.MemberCacheFlags:15 of -msgid "The default value is all flags enabled." -msgstr "" - -#: discord.MemberCacheFlags.all:1 of -msgid "" -"A factory method that creates a :class:`MemberCacheFlags` with everything" -" enabled." -msgstr "" - -#: discord.MemberCacheFlags.none:1 of -msgid "" -"A factory method that creates a :class:`MemberCacheFlags` with everything" -" disabled." -msgstr "" - -#: discord.MemberCacheFlags.online:1 of -msgid "Whether to cache members with a status." -msgstr "" - -#: discord.MemberCacheFlags.online:3 of -msgid "" -"For example, members that are part of the initial ``GUILD_CREATE`` or " -"become online at a later point. This requires :attr:`Intents.presences`." -msgstr "" - -#: discord.MemberCacheFlags.online:6 of -msgid "Members that go offline are no longer cached." -msgstr "" - -#: discord.MemberCacheFlags.voice:1 of -msgid "Whether to cache members that are in voice." -msgstr "" - -#: discord.MemberCacheFlags.voice:3 of -msgid "This requires :attr:`Intents.voice_states`." -msgstr "" - -#: discord.MemberCacheFlags.voice:5 of -msgid "Members that leave voice are no longer cached." -msgstr "" - -#: discord.MemberCacheFlags.joined:1 of -msgid "" -"Whether to cache members that joined the guild or are chunked as part of " -"the initial log in flow." -msgstr "" - -#: discord.MemberCacheFlags.joined:4 of -msgid "This requires :attr:`Intents.members`." -msgstr "" - -#: discord.MemberCacheFlags.joined:6 of -msgid "Members that leave the guild are no longer cached." -msgstr "" - -#: discord.MemberCacheFlags.from_intents:1 of -msgid "" -"A factory method that creates a :class:`MemberCacheFlags` based on the " -"currently selected :class:`Intents`." -msgstr "" - -#: discord.MemberCacheFlags.from_intents:4 of -#, fuzzy -msgid "The intents to select from." -msgstr "メンションをエスケープするテキスト。" - -#: discord.MemberCacheFlags.from_intents:7 of -msgid "The resulting member cache flags." -msgstr "" - -#: discord.MemberCacheFlags.from_intents:8 of -#, fuzzy -msgid ":class:`MemberCacheFlags`" -msgstr ":class:`bytes`" - -#: ../../api.rst:2908 -msgid "File" -msgstr "" - -#: discord.File:1 of -msgid "" -"A parameter object used for :meth:`abc.Messageable.send` for sending file" -" objects." -msgstr "" - -#: discord.File:6 of -msgid "" -"File objects are single use and are not meant to be reused in multiple " -":meth:`abc.Messageable.send`\\s." -msgstr "" - -#: discord.File:11 of -msgid "" -"A file-like object opened in binary mode and read mode or a filename " -"representing a file in the hard drive to open." -msgstr "" - -#: discord.File:17 of -msgid "" -"If the file-like object passed is opened via ``open`` then the modes 'rb'" -" should be used." -msgstr "" - -#: discord.File:20 of -msgid "To pass binary data, consider usage of ``io.BytesIO``." -msgstr "" - -#: discord.File:22 of -msgid "Union[:class:`str`, :class:`io.BufferedIOBase`]" -msgstr "" - -#: discord.File:26 of -msgid "" -"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." -msgstr "" - -#: discord.File:34 of -msgid "Whether the attachment is a spoiler." -msgstr "" - -#: ../../api.rst:2914 -msgid "Colour" -msgstr "" - -#: discord.Colour:1 of -msgid "" -"Represents a Discord role colour. This class is similar to a (red, green," -" blue) :class:`tuple`." -msgstr "" - -#: discord.Colour:4 of -msgid "There is an alias for this called Color." -msgstr "" - -#: discord.Colour:10 of -msgid "Checks if two colours are equal." -msgstr "" - -#: discord.Colour:14 of -msgid "Checks if two colours are not equal." -msgstr "" - -#: discord.Colour:18 of -msgid "Return the colour's hash." -msgstr "" - -#: discord.Colour:22 of -msgid "Returns the hex format for the colour." -msgstr "" - -#: discord.Colour:26 of -msgid "The raw integer colour value." -msgstr "" - -#: discord.Colour.r:1 of -msgid "Returns the red component of the colour." -msgstr "" - -#: discord.Colour.g:1 of -msgid "Returns the green component of the colour." -msgstr "" - -#: discord.Colour.b:1 of -msgid "Returns the blue component of the colour." -msgstr "" - -#: discord.Colour.to_rgb:1 of -msgid "" -"Tuple[:class:`int`, :class:`int`, :class:`int`]: Returns an (r, g, b) " -"tuple representing the colour." -msgstr "" - -#: discord.Colour.from_rgb:1 of -msgid "Constructs a :class:`Colour` from an RGB tuple." -msgstr "" - -#: discord.Colour.from_hsv:1 of -msgid "Constructs a :class:`Colour` from an HSV tuple." -msgstr "" - -#: discord.Colour.default:1 of -msgid "A factory method that returns a :class:`Colour` with a value of ``0``." -msgstr "" - -#: discord.Colour.teal:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x1abc9c``." -msgstr "" - -#: discord.Colour.dark_teal:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x11806a``." -msgstr "" - -#: discord.Colour.green:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x2ecc71``." -msgstr "" - -#: discord.Colour.dark_green:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x1f8b4c``." -msgstr "" - -#: discord.Colour.blue:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x3498db``." -msgstr "" - -#: discord.Colour.dark_blue:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x206694``." -msgstr "" - -#: discord.Colour.purple:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x9b59b6``." -msgstr "" - -#: discord.Colour.dark_purple:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x71368a``." -msgstr "" - -#: discord.Colour.magenta:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0xe91e63``." -msgstr "" - -#: discord.Colour.dark_magenta:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0xad1457``." -msgstr "" - -#: discord.Colour.gold:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0xf1c40f``." -msgstr "" - -#: discord.Colour.dark_gold:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0xc27c0e``." -msgstr "" - -#: discord.Colour.orange:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0xe67e22``." -msgstr "" - -#: discord.Colour.dark_orange:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0xa84300``." -msgstr "" - -#: discord.Colour.red:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0xe74c3c``." -msgstr "" - -#: discord.Colour.dark_red:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x992d22``." -msgstr "" - -#: discord.Colour.lighter_gray:1 discord.Colour.lighter_grey:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x95a5a6``." -msgstr "" - -#: discord.Colour.dark_gray:1 discord.Colour.dark_grey:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x607d8b``." -msgstr "" - -#: discord.Colour.light_gray:1 discord.Colour.light_grey:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x979c9f``." -msgstr "" - -#: discord.Colour.darker_gray:1 discord.Colour.darker_grey:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x546e7a``." -msgstr "" - -#: discord.Colour.blurple:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x7289da``." -msgstr "" - -#: discord.Colour.greyple:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x99aab5``." -msgstr "" - -#: discord.Colour.dark_theme:1 of -msgid "" -"A factory method that returns a :class:`Colour` with a value of " -"``0x36393F``. This will appear transparent on Discord's dark theme." -msgstr "" - -#: ../../api.rst:2920 -msgid "BaseActivity" -msgstr "" - -#: discord.BaseActivity:1 of -msgid "" -"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`." -msgstr "" - -#: discord.BaseActivity:4 of -msgid "The following types currently count as user-settable:" -msgstr "" - -#: discord.BaseActivity:6 of -#, fuzzy -msgid ":class:`Activity`" -msgstr ":class:`.Invite`" - -#: discord.Activity:9 discord.BaseActivity:7 of -msgid ":class:`Game`" -msgstr "" - -#: discord.Activity:10 discord.BaseActivity:8 of -msgid ":class:`Streaming`" -msgstr "" - -#: discord.BaseActivity:9 of -#, fuzzy -msgid ":class:`CustomActivity`" -msgstr ":class:`str`" - -#: discord.BaseActivity:11 of -msgid "" -"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." -msgstr "" - -#: discord.BaseActivity.created_at:1 of -msgid "When the user started doing this activity in UTC." -msgstr "" - -#: ../../api.rst:2926 -msgid "Activity" -msgstr "" - -#: discord.Activity:1 of -msgid "Represents an activity in Discord." -msgstr "" - -#: discord.Activity:3 of -msgid "" -"This could be an activity such as streaming, playing, listening or " -"watching." -msgstr "" - -#: discord.Activity:6 of -msgid "" -"For memory optimisation purposes, some activities are offered in slimmed " -"down versions:" -msgstr "" - -#: discord.Activity:14 of -msgid "The application ID of the game." -msgstr "" - -#: discord.Activity:20 of -#, fuzzy -msgid "The name of the activity." -msgstr "ギルドの名前。" - -#: discord.Activity:26 of -msgid "A stream URL that the activity could be doing." -msgstr "" - -#: discord.Activity:32 of -msgid "The type of activity currently being done." -msgstr "" - -#: discord.Activity:38 of -msgid "The user's current state. For example, \"In Game\"." -msgstr "" - -#: discord.Activity:44 of -msgid "The detail of the user's current activity." -msgstr "" - -#: discord.Activity:50 of -msgid "A dictionary of timestamps. It contains the following optional keys:" -msgstr "" - -#: discord.Activity:52 of -msgid "" -"``start``: Corresponds to when the user started doing the activity in " -"milliseconds since Unix epoch." -msgstr "" - -#: discord.Activity:54 of -msgid "" -"``end``: Corresponds to when the user will finish doing the activity in " -"milliseconds since Unix epoch." -msgstr "" - -#: discord.Activity:61 of -msgid "" -"A dictionary representing the images and their hover text of an activity." -" It contains the following optional keys:" -msgstr "" - -#: discord.Activity:64 of -msgid "``large_image``: A string representing the ID for the large image asset." -msgstr "" - -#: discord.Activity:65 of -msgid "" -"``large_text``: A string representing the text when hovering over the " -"large image asset." -msgstr "" - -#: discord.Activity:66 of -msgid "``small_image``: A string representing the ID for the small image asset." -msgstr "" - -#: discord.Activity:67 of -msgid "" -"``small_text``: A string representing the text when hovering over the " -"small image asset." -msgstr "" - -#: discord.Activity:73 of -msgid "" -"A dictionary representing the activity party. It contains the following " -"optional keys:" -msgstr "" - -#: discord.Activity:75 of -msgid "``id``: A string representing the party ID." -msgstr "" - -#: discord.Activity:76 of -msgid "" -"``size``: A list of up to two integer elements denoting (current_size, " -"maximum_size)." -msgstr "" - -#: discord.Activity:82 of -msgid "The emoji that belongs to this activity." -msgstr "" - -#: discord.Activity:84 discord.CustomActivity:33 of -msgid "Optional[:class:`PartialEmoji`]" -msgstr "" - -#: discord.Activity.start:1 of -msgid "When the user started doing this activity in UTC, if applicable." -msgstr "" - -#: discord.Activity.end:1 of -msgid "When the user will stop doing this activity in UTC, if applicable." -msgstr "" - -#: discord.Activity.large_image_url:1 of -msgid "" -"Returns a URL pointing to the large image asset of this activity if " -"applicable." -msgstr "" - -#: discord.Activity.small_image_url:1 of -msgid "" -"Returns a URL pointing to the small image asset of this activity if " -"applicable." -msgstr "" - -#: discord.Activity.large_image_text:1 of -msgid "Returns the large image asset hover text of this activity if applicable." -msgstr "" - -#: discord.Activity.small_image_text:1 of -msgid "Returns the small image asset hover text of this activity if applicable." -msgstr "" - -#: ../../api.rst:2932 -msgid "Game" -msgstr "" - -#: discord.Game:1 of -msgid "" -"A slimmed down version of :class:`Activity` that represents a Discord " -"game." -msgstr "" - -#: discord.Game:3 of -msgid "" -"This is typically displayed via **Playing** on the official Discord " -"client." -msgstr "" - -#: discord.Game:9 of -msgid "Checks if two games are equal." -msgstr "" - -#: discord.Game:13 of -msgid "Checks if two games are not equal." -msgstr "" - -#: discord.Game:17 of -msgid "Returns the game's hash." -msgstr "" - -#: discord.Game:21 of -msgid "Returns the game's name." -msgstr "" - -#: discord.Game:23 discord.Game:32 of -msgid "The game's name." -msgstr "" - -#: discord.Game:25 of -msgid "" -"A naive UTC timestamp representing when the game started. Keyword-only " -"parameter. Ignored for bots." -msgstr "" - -#: discord.Game:27 of -msgid "" -"A naive UTC timestamp representing when the game ends. Keyword-only " -"parameter. Ignored for bots." -msgstr "" - -#: discord.Game.type:1 discord.Streaming.type:1 of -msgid "Returns the game's type. This is for compatibility with :class:`Activity`." -msgstr "" - -#: discord.Game.type:3 of -msgid "It always returns :attr:`ActivityType.playing`." -msgstr "" - -#: discord.Game.start:1 of -msgid "When the user started playing this game in UTC, if applicable." -msgstr "" - -#: discord.Game.end:1 of -msgid "When the user will stop playing this game in UTC, if applicable." -msgstr "" - -#: ../../api.rst:2938 -msgid "Streaming" -msgstr "" - -#: discord.Streaming:1 of -msgid "" -"A slimmed down version of :class:`Activity` that represents a Discord " -"streaming status." -msgstr "" - -#: discord.Streaming:3 of -msgid "" -"This is typically displayed via **Streaming** on the official Discord " -"client." -msgstr "" - -#: discord.Streaming:9 of -msgid "Checks if two streams are equal." -msgstr "" - -#: discord.Streaming:13 of -msgid "Checks if two streams are not equal." -msgstr "" - -#: discord.Streaming:17 of -msgid "Returns the stream's hash." -msgstr "" - -#: discord.Streaming:21 of -msgid "Returns the stream's name." -msgstr "" - -#: discord.Streaming:25 of -msgid "Where the user is streaming from (ie. YouTube, Twitch)." -msgstr "" - -#: discord.Streaming:33 of -#, fuzzy -msgid "The stream's name." -msgstr "役職の名前を返します。" - -#: discord.Streaming:39 of -#, fuzzy -msgid "An alias for :attr:`name`" -msgstr ":attr:`dnd` のエイリアス。" - -#: discord.Streaming:45 of -#, fuzzy -msgid "The game being streamed." -msgstr "更新された後のギルド。" - -#: discord.Streaming:53 of -msgid "The stream's URL." -msgstr "" - -#: discord.Streaming:59 of -msgid "" -"A dictionary comprising of similar keys than those in " -":attr:`Activity.assets`." -msgstr "" - -#: discord.Streaming.type:3 of -msgid "It always returns :attr:`ActivityType.streaming`." -msgstr "" - -#: discord.Streaming.twitch_name:1 of -msgid "If provided, the twitch name of the user streaming." -msgstr "" - -#: discord.Streaming.twitch_name:3 of -msgid "" -"This corresponds to the ``large_image`` key of the " -":attr:`Streaming.assets` dictionary if it starts with ``twitch:``. " -"Typically set by the Discord client." -msgstr "" - -#: ../../api.rst:2944 -msgid "CustomActivity" -msgstr "" - -#: discord.CustomActivity:1 of -#, fuzzy -msgid "Represents a Custom activity from Discord." -msgstr "Discordのリレーションシップを表します。" - -#: discord.CustomActivity:19 of -#, fuzzy -msgid "Returns the custom status text." -msgstr "カテゴリの名前を返します。" - -#: discord.CustomActivity:25 of -msgid "The custom activity's name." -msgstr "" - -#: discord.CustomActivity:31 of -msgid "The emoji to pass to the activity, if any." -msgstr "" - -#: discord.CustomActivity.type:3 of -msgid "It always returns :attr:`ActivityType.custom`." -msgstr "" - -#: ../../api.rst:2950 -msgid "Permissions" -msgstr "" - -#: discord.Permissions:1 of -msgid "Wraps up the Discord permission value." -msgstr "" - -#: discord.Permissions:3 of -msgid "" -"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." -msgstr "" - -#: discord.Permissions:7 of -msgid "" -"You can now use keyword arguments to initialize :class:`Permissions` " -"similar to :meth:`update`." -msgstr "" - -#: discord.Permissions:15 of -msgid "Checks if two permissions are equal." -msgstr "" - -#: discord.Permissions:18 of -msgid "Checks if two permissions are not equal." -msgstr "" - -#: discord.Permissions:21 of -msgid "Checks if a permission is a subset of another permission." -msgstr "" - -#: discord.Permissions:24 of -msgid "Checks if a permission is a superset of another permission." -msgstr "" - -#: discord.Permissions:27 of -msgid "Checks if a permission is a strict subset of another permission." -msgstr "" - -#: discord.Permissions:30 of -msgid "Checks if a permission is a strict superset of another permission." -msgstr "" - -#: discord.Permissions:33 of -msgid "Return the permission's hash." -msgstr "" - -#: discord.PermissionOverwrite:22 discord.Permissions:36 of -msgid "" -"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." -msgstr "" - -#: discord.Permissions:42 of -msgid "" -"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." -msgstr "" - -#: discord.Permissions.is_subset:1 of -msgid "Returns ``True`` if self has the same or fewer permissions as other." -msgstr "" - -#: discord.Permissions.is_superset:1 of -msgid "Returns ``True`` if self has the same or more permissions as other." -msgstr "" - -#: discord.Permissions.is_strict_subset:1 of -msgid "" -"Returns ``True`` if the permissions on other are a strict subset of those" -" on self." -msgstr "" - -#: discord.Permissions.is_strict_superset:1 of -msgid "" -"Returns ``True`` if the permissions on other are a strict superset of " -"those on self." -msgstr "" - -#: discord.Permissions.none:1 of -msgid "" -"A factory method that creates a :class:`Permissions` with all permissions" -" set to ``False``." -msgstr "" - -#: discord.Permissions.all:1 of -msgid "" -"A factory method that creates a :class:`Permissions` with all permissions" -" set to ``True``." -msgstr "" - -#: discord.Permissions.all_channel:1 of -msgid "" -"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:" -msgstr "" - -#: discord.Permissions.all_channel:5 of -msgid "manage_guild" -msgstr "" - -#: discord.Permissions.all_channel:6 of -msgid "kick_members" -msgstr "" - -#: discord.Permissions.all_channel:7 of -msgid "ban_members" -msgstr "" - -#: discord.Permissions.all_channel:8 of -msgid "administrator" -msgstr "" - -#: discord.Permissions.all_channel:9 of -msgid "change_nickname" -msgstr "" - -#: discord.Permissions.all_channel:10 of -msgid "manage_nicknames" -msgstr "" - -#: discord.Permissions.general:1 of -msgid "" -"A factory method that creates a :class:`Permissions` with all \"General\"" -" permissions from the official Discord UI set to ``True``." -msgstr "" - -#: discord.Permissions.text:1 of -msgid "" -"A factory method that creates a :class:`Permissions` with all \"Text\" " -"permissions from the official Discord UI set to ``True``." -msgstr "" - -#: discord.Permissions.voice:1 of -msgid "" -"A factory method that creates a :class:`Permissions` with all \"Voice\" " -"permissions from the official Discord UI set to ``True``." -msgstr "" - -#: discord.Permissions.update:1 of -msgid "Bulk updates this permission object." -msgstr "" - -#: discord.PermissionOverwrite.update:3 discord.Permissions.update:3 of -msgid "" -"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." -msgstr "" - -#: discord.Permissions.update:7 of -msgid "A list of key/value pairs to bulk update permissions with." -msgstr "" - -#: discord.Permissions.create_instant_invite:1 of -msgid "Returns ``True`` if the user can create instant invites." -msgstr "" - -#: discord.Permissions.kick_members:1 of -msgid "Returns ``True`` if the user can kick users from the guild." -msgstr "" - -#: discord.Permissions.ban_members:1 of -msgid "Returns ``True`` if a user can ban users from the guild." -msgstr "" - -#: discord.Permissions.administrator:1 of -msgid "" -"Returns ``True`` if a user is an administrator. This role overrides all " -"other permissions." -msgstr "" - -#: discord.Permissions.administrator:3 of -msgid "This also bypasses all channel-specific overrides." -msgstr "" - -#: discord.Permissions.manage_channels:1 of -msgid "" -"Returns ``True`` if a user can edit, delete, or create channels in the " -"guild." -msgstr "" - -#: discord.Permissions.manage_channels:3 of -msgid "This also corresponds to the \"Manage Channel\" channel-specific override." -msgstr "" - -#: discord.Permissions.manage_guild:1 of -msgid "Returns ``True`` if a user can edit guild properties." -msgstr "" - -#: discord.Permissions.add_reactions:1 of -msgid "Returns ``True`` if a user can add reactions to messages." -msgstr "" - -#: discord.Permissions.view_audit_log:1 of -msgid "Returns ``True`` if a user can view the guild's audit log." -msgstr "" - -#: discord.Permissions.priority_speaker:1 of -msgid "Returns ``True`` if a user can be more easily heard while talking." -msgstr "" - -#: discord.Permissions.stream:1 of -msgid "Returns ``True`` if a user can stream in a voice channel." -msgstr "" - -#: discord.Permissions.read_messages:1 of -msgid "" -"Returns ``True`` if a user can read messages from all or specific text " -"channels." -msgstr "" - -#: discord.Permissions.view_channel:1 of -#, fuzzy -msgid "An alias for :attr:`read_messages`." -msgstr ":attr:`extreme` のエイリアス。" - -#: discord.Permissions.send_messages:1 of -msgid "" -"Returns ``True`` if a user can send messages from all or specific text " -"channels." -msgstr "" - -#: discord.Permissions.send_tts_messages:1 of -msgid "" -"Returns ``True`` if a user can send TTS messages from all or specific " -"text channels." -msgstr "" - -#: discord.Permissions.manage_messages:1 of -msgid "Returns ``True`` if a user can delete or pin messages in a text channel." -msgstr "" - -#: discord.Permissions.manage_messages:5 of -msgid "Note that there are currently no ways to edit other people's messages." -msgstr "" - -#: discord.Permissions.embed_links:1 of -msgid "" -"Returns ``True`` if a user's messages will automatically be embedded by " -"Discord." -msgstr "" - -#: discord.Permissions.attach_files:1 of -msgid "Returns ``True`` if a user can send files in their messages." -msgstr "" - -#: discord.Permissions.read_message_history:1 of -msgid "Returns ``True`` if a user can read a text channel's previous messages." -msgstr "" - -#: discord.Permissions.mention_everyone:1 of -msgid "" -"Returns ``True`` if a user's @everyone or @here will mention everyone in " -"the text channel." -msgstr "" - -#: discord.Permissions.external_emojis:1 of -msgid "Returns ``True`` if a user can use emojis from other guilds." -msgstr "" - -#: discord.Permissions.use_external_emojis:1 of -#, fuzzy -msgid "An alias for :attr:`external_emojis`." -msgstr ":attr:`extreme` のエイリアス。" - -#: discord.Permissions.view_guild_insights:1 of -msgid "Returns ``True`` if a user can view the guild's insights." -msgstr "" - -#: discord.Permissions.connect:1 of -msgid "Returns ``True`` if a user can connect to a voice channel." -msgstr "" - -#: discord.Permissions.speak:1 of -msgid "Returns ``True`` if a user can speak in a voice channel." -msgstr "" - -#: discord.Permissions.mute_members:1 of -msgid "Returns ``True`` if a user can mute other users." -msgstr "" - -#: discord.Permissions.deafen_members:1 of -msgid "Returns ``True`` if a user can deafen other users." -msgstr "" - -#: discord.Permissions.move_members:1 of -msgid "Returns ``True`` if a user can move users between other voice channels." -msgstr "" - -#: discord.Permissions.use_voice_activation:1 of -msgid "Returns ``True`` if a user can use voice activation in voice channels." -msgstr "" - -#: discord.Permissions.change_nickname:1 of -msgid "Returns ``True`` if a user can change their nickname in the guild." -msgstr "" - -#: discord.Permissions.manage_nicknames:1 of -msgid "Returns ``True`` if a user can change other user's nickname in the guild." -msgstr "" - -#: discord.Permissions.manage_roles:1 of -msgid "" -"Returns ``True`` if a user can create or edit roles less than their " -"role's position." -msgstr "" - -#: discord.Permissions.manage_roles:3 of -msgid "" -"This also corresponds to the \"Manage Permissions\" channel-specific " -"override." -msgstr "" - -#: discord.Permissions.manage_permissions:1 of -#, fuzzy -msgid "An alias for :attr:`manage_roles`." -msgstr ":attr:`extreme` のエイリアス。" - -#: discord.Permissions.manage_webhooks:1 of -msgid "Returns ``True`` if a user can create, edit, or delete webhooks." -msgstr "" - -#: discord.Permissions.manage_emojis:1 of -msgid "Returns ``True`` if a user can create, edit, or delete emojis." -msgstr "" - -#: ../../api.rst:2956 -msgid "PermissionOverwrite" -msgstr "" - -#: discord.PermissionOverwrite:1 of -msgid "A type that is used to represent a channel specific permission." -msgstr "" - -#: discord.PermissionOverwrite:3 of -msgid "" -"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." -msgstr "" - -#: discord.PermissionOverwrite:9 of -msgid "" -"The values supported by this are the same as :class:`Permissions` with " -"the added possibility of it being set to ``None``." -msgstr "" - -#: discord.PermissionOverwrite:16 of -msgid "Checks if two overwrites are equal." -msgstr "" - -#: discord.PermissionOverwrite:19 of -msgid "Checks if two overwrites are not equal." -msgstr "" - -#: discord.PermissionOverwrite:26 of -msgid "Set the value of permissions by their name." -msgstr "" - -#: discord.PermissionOverwrite.pair:1 of -msgid "" -"Tuple[:class:`Permissions`, :class:`Permissions`]: Returns the (allow, " -"deny) pair from this overwrite." -msgstr "" - -#: discord.PermissionOverwrite.from_pair:1 of -msgid "Creates an overwrite from an allow/deny pair of :class:`Permissions`." -msgstr "" - -#: discord.PermissionOverwrite.is_empty:1 of -msgid "Checks if the permission overwrite is currently empty." -msgstr "" - -#: discord.PermissionOverwrite.is_empty:3 of -msgid "" -"An empty permission overwrite is one that has no overwrites set to " -"``True`` or ``False``." -msgstr "" - -#: discord.PermissionOverwrite.is_empty:6 of -msgid "Indicates if the overwrite is empty." -msgstr "" - -#: discord.PermissionOverwrite.update:1 of -msgid "Bulk updates this permission overwrite object." -msgstr "" - -#: discord.PermissionOverwrite.update:7 of -msgid "A list of key/value pairs to bulk update with." -msgstr "" - -#: ../../api.rst:2962 -msgid "ShardInfo" -msgstr "" - -#: discord.ShardInfo:1 of -msgid "A class that gives information and control over a specific shard." -msgstr "" - -#: discord.ShardInfo:3 of -msgid "" -"You can retrieve this object via :meth:`AutoShardedClient.get_shard` or " -":attr:`AutoShardedClient.shards`." -msgstr "" - -#: discord.ShardInfo:10 of -#, fuzzy -msgid "The shard ID for this shard." -msgstr "準備が完了したShard ID。" - -#: discord.ShardInfo:16 of -msgid "" -"The shard count for this cluster. If this is ``None`` then the bot has " -"not started yet." -msgstr "" - -#: discord.ShardInfo.is_closed:1 of -msgid ":class:`bool`: Whether the shard connection is currently closed." -msgstr "" - -#: discord.ShardInfo.disconnect:3 of -msgid "" -"Disconnects a shard. When this is called, the shard connection will no " -"longer be open." -msgstr "" - -#: discord.ShardInfo.disconnect:6 of -msgid "If the shard is already disconnected this does nothing." -msgstr "" - -#: discord.ShardInfo.reconnect:3 of -msgid "Disconnects and then connects the shard again." -msgstr "" - -#: discord.ShardInfo.connect:3 of -msgid "Connects a shard. If the shard is already connected this does nothing." -msgstr "" - -#: discord.ShardInfo.latency:1 of -msgid "" -"Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds for " -"this shard." -msgstr "" - -#: ../../api.rst:2968 -msgid "SystemChannelFlags" -msgstr "" - -#: discord.SystemChannelFlags:1 of -msgid "Wraps up a Discord system channel flag value." -msgstr "" - -#: discord.SystemChannelFlags:3 of -msgid "" -"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." -msgstr "" - -#: discord.MessageFlags:25 discord.PublicUserFlags:24 -#: discord.SystemChannelFlags:28 of -msgid "" -"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." -msgstr "" - -#: discord.SystemChannelFlags.join_notifications:1 of -msgid "" -"Returns ``True`` if the system channel is used for member join " -"notifications." -msgstr "" - -#: discord.SystemChannelFlags.premium_subscriptions:1 of -msgid "" -"Returns ``True`` if the system channel is used for Nitro boosting " -"notifications." -msgstr "" - -#: ../../api.rst:2974 -msgid "MessageFlags" -msgstr "" - -#: discord.MessageFlags:1 of -msgid "Wraps up a Discord Message flag value." -msgstr "" - -#: discord.MessageFlags:3 of -msgid "See :class:`SystemChannelFlags`." -msgstr "" - -#: discord.MessageFlags.crossposted:1 of -msgid "Returns ``True`` if the message is the original crossposted message." -msgstr "" - -#: discord.MessageFlags.is_crossposted:1 of -msgid "Returns ``True`` if the message was crossposted from another channel." -msgstr "" - -#: discord.MessageFlags.suppress_embeds:1 of -msgid "Returns ``True`` if the message's embeds have been suppressed." -msgstr "" - -#: discord.MessageFlags.source_message_deleted:1 of -msgid "" -"Returns ``True`` if the source message for this crosspost has been " -"deleted." -msgstr "" - -#: discord.MessageFlags.urgent:1 of -msgid "Returns ``True`` if the source message is an urgent message." -msgstr "" - -#: discord.MessageFlags.urgent:3 of -msgid "An urgent message is one sent by Discord Trust and Safety." -msgstr "" - -#: ../../api.rst:2980 -msgid "PublicUserFlags" -msgstr "" - -#: discord.PublicUserFlags:1 of -msgid "Wraps up the Discord User Public flags." -msgstr "" - -#: discord.PublicUserFlags:7 of -#, fuzzy -msgid "Checks if two PublicUserFlags are equal." -msgstr "二つのユーザーが等しいかを比較します。" - -#: discord.PublicUserFlags:10 of -#, fuzzy -msgid "Checks if two PublicUserFlags are not equal." -msgstr "二つのユーザーが等しいものではないか比較します。" - -#: discord.PublicUserFlags:16 of -msgid "" -"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." -msgstr "" - -#: discord.PublicUserFlags.staff:1 of -msgid "Returns ``True`` if the user is a Discord Employee." -msgstr "" - -#: discord.PublicUserFlags.partner:1 of -#, fuzzy -msgid "Returns ``True`` if the user is a Discord Partner." -msgstr "ユーザーがDiscordパートナーかを示す真偽値。" - -#: discord.PublicUserFlags.hypesquad:1 of -msgid "Returns ``True`` if the user is a HypeSquad Events member." -msgstr "" - -#: discord.PublicUserFlags.bug_hunter:1 of -#, fuzzy -msgid "Returns ``True`` if the user is a Bug Hunter" -msgstr "ユーザーがバグハンターかを示す真偽値。" - -#: discord.PublicUserFlags.hypesquad_bravery:1 of -msgid "Returns ``True`` if the user is a HypeSquad Bravery member." -msgstr "" - -#: discord.PublicUserFlags.hypesquad_brilliance:1 of -msgid "Returns ``True`` if the user is a HypeSquad Brilliance member." -msgstr "" - -#: discord.PublicUserFlags.hypesquad_balance:1 of -msgid "Returns ``True`` if the user is a HypeSquad Balance member." -msgstr "" - -#: discord.PublicUserFlags.early_supporter:1 of -msgid "Returns ``True`` if the user is an Early Supporter." -msgstr "" - -#: discord.PublicUserFlags.team_user:1 of -msgid "Returns ``True`` if the user is a Team User." -msgstr "" - -#: discord.PublicUserFlags.system:1 of -msgid "" -"Returns ``True`` if the user is a system user (i.e. represents Discord " -"officially)." -msgstr "" - -#: discord.PublicUserFlags.bug_hunter_level_2:1 of -msgid "Returns ``True`` if the user is a Bug Hunter Level 2" -msgstr "" - -#: discord.PublicUserFlags.verified_bot:1 of -#, fuzzy -msgid "Returns ``True`` if the user is a Verified Bot." -msgstr ":class:`bool` -- ユーザーが認証済みアカウントであるかを表します。" - -#: discord.PublicUserFlags.verified_bot_developer:1 of -msgid "Returns ``True`` if the user is an Early Verified Bot Developer." -msgstr "" - -#: discord.PublicUserFlags.early_verified_bot_developer:1 of -#, fuzzy -msgid "An alias for :attr:`verified_bot_developer`." -msgstr ":attr:`dnd` のエイリアス。" - -#: discord.PublicUserFlags.all:1 of -#, fuzzy -msgid "List[:class:`UserFlags`]: Returns all public flags the user has." -msgstr "List[:class:`User`] -- ユーザーが持つすべてのリレーションシップを返します。" - -#: ../../api.rst:2987 -msgid "Exceptions" -msgstr "例外" - -#: ../../api.rst:2989 -msgid "The following exceptions are thrown by the library." -msgstr "" - -#: discord.DiscordException:1 of -msgid "Base exception class for discord.py" -msgstr "" - -#: discord.DiscordException:3 of -msgid "" -"Ideally speaking, this could be caught to handle any exceptions thrown " -"from this library." -msgstr "" - -#: discord.ClientException:1 of -msgid "Exception that's thrown when an operation in the :class:`Client` fails." -msgstr "" - -#: discord.ClientException:3 of -msgid "These are usually for exceptions that happened due to user input." -msgstr "" - -#: discord.LoginFailure:1 of -msgid "" -"Exception that's thrown when the :meth:`Client.login` function fails to " -"log you in from improper credentials or some other misc. failure." -msgstr "" - -#: discord.NoMoreItems:1 of -msgid "" -"Exception that is thrown when an async iteration operation has no more " -"items." -msgstr "" - -#: discord.HTTPException:1 of -msgid "Exception that's thrown when an HTTP request operation fails." -msgstr "" - -#: discord.HTTPException:5 of -msgid "" -"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`." -msgstr "" - -#: discord.HTTPException:9 of -#, fuzzy -msgid ":class:`aiohttp.ClientResponse`" -msgstr ":class:`~discord.ClientUser`" - -#: discord.HTTPException:13 of -msgid "The text of the error. Could be an empty string." -msgstr "" - -#: discord.HTTPException:19 of -msgid "The status code of the HTTP request." -msgstr "" - -#: discord.HTTPException:25 of -msgid "The Discord specific error code for the failure." -msgstr "" - -#: discord.Forbidden:1 of -msgid "Exception that's thrown for when status code 403 occurs." -msgstr "" - -#: discord.Forbidden:3 discord.NotFound:3 of -msgid "Subclass of :exc:`HTTPException`" -msgstr ":exc:`HTTPException` のサブクラス" - -#: discord.NotFound:1 of -msgid "Exception that's thrown for when status code 404 occurs." -msgstr "" - -#: discord.DiscordServerError:1 of -msgid "Exception that's thrown for when a 500 range status code occurs." -msgstr "" - -#: discord.DiscordServerError:3 of -#, fuzzy -msgid "Subclass of :exc:`HTTPException`." -msgstr ":exc:`HTTPException` のサブクラス" - -#: discord.InvalidData:1 of -msgid "" -"Exception that's raised when the library encounters unknown or invalid " -"data from Discord." -msgstr "" - -#: discord.InvalidArgument:1 of -msgid "" -"Exception that's thrown when an argument to a function is invalid some " -"way (e.g. wrong value or wrong type)." -msgstr "" - -#: discord.InvalidArgument:4 of -msgid "" -"This could be considered the analogous of ``ValueError`` and " -"``TypeError`` except inherited from :exc:`ClientException` and thus " -":exc:`DiscordException`." -msgstr "" - -#: discord.GatewayNotFound:1 of -msgid "" -"An exception that is usually thrown when the gateway hub for the " -":class:`Client` websocket is not found." -msgstr "" - -#: discord.ConnectionClosed:1 of -msgid "" -"Exception that's thrown when the gateway connection is closed for reasons" -" that could not be handled internally." -msgstr "" - -#: discord.ConnectionClosed:6 of -msgid "The close code of the websocket." -msgstr "" - -#: discord.ConnectionClosed:12 of -#, fuzzy -msgid "The reason provided for the closure." -msgstr "クライアントによって提供されるデフォルトのエラーハンドラ。" - -#: discord.ConnectionClosed:18 discord.PrivilegedIntentsRequired:12 of -msgid "The shard ID that got closed if applicable." -msgstr "" - -#: discord.PrivilegedIntentsRequired:1 of -msgid "" -"Exception that's thrown when the gateway is requesting privileged intents" -" but they're not ticked in the developer page yet." -msgstr "" - -#: discord.PrivilegedIntentsRequired:4 of -msgid "" -"Go to https://discord.com/developers/applications/ and enable the intents" -" that are required. Currently these are as follows:" -msgstr "" - -#: discord.PrivilegedIntentsRequired:7 of -#, fuzzy -msgid ":attr:`Intents.members`" -msgstr ":attr:`Permissions.mute_members`" - -#: discord.PrivilegedIntentsRequired:8 of -#, fuzzy -msgid ":attr:`Intents.presences`" -msgstr ":attr:`approximate_presence_count`" - -#: discord.opus.OpusError:1 of -msgid "An exception that is thrown for libopus related errors." -msgstr "" - -#: discord.opus.OpusError:5 of -msgid "The error code returned." -msgstr "" - -#: discord.opus.OpusNotLoaded:1 of -msgid "An exception that is thrown for when libopus is not loaded." -msgstr "" - -#: ../../api.rst:3023 -msgid "Exception Hierarchy" -msgstr "" - -#: ../../api.rst:3039 -msgid ":exc:`Exception`" -msgstr "" - -#: ../../api.rst:3039 -msgid ":exc:`DiscordException`" -msgstr "" - -#: ../../api.rst:3033 -msgid ":exc:`ClientException`" -msgstr "" - -#: ../../api.rst:3030 -msgid ":exc:`InvalidData`" -msgstr "" - -#: ../../api.rst:3031 -msgid ":exc:`InvalidArgument`" -msgstr "" - -#: ../../api.rst:3032 -msgid ":exc:`LoginFailure`" -msgstr "" - -#: ../../api.rst:3033 -msgid ":exc:`ConnectionClosed`" -msgstr "" - -#: ../../api.rst:3034 -msgid ":exc:`PrivilegedIntentsRequired`" -msgstr "" - -#: ../../api.rst:3035 -msgid ":exc:`NoMoreItems`" -msgstr "" - -#: ../../api.rst:3036 -msgid ":exc:`GatewayNotFound`" -msgstr "" - -#: ../../api.rst:3039 -msgid ":exc:`HTTPException`" -msgstr "" - -#: ../../api.rst:3038 -msgid ":exc:`Forbidden`" -msgstr "" - -#: ../../api.rst:3039 -msgid ":exc:`NotFound`" -msgstr "" - -#: ../../api.rst:3040 -#, fuzzy -msgid ":exc:`DiscordServerError`" -msgstr ":class:`~discord.User`" - -#~ msgid "" -#~ "Indicates if :func:`.on_ready` should be " -#~ "delayed to fetch all offline members " -#~ "from the guilds the bot belongs " -#~ "to. If this is ``False``\\, then " -#~ "no offline members are received and " -#~ ":meth:`request_offline_members` must be used " -#~ "to fetch the offline members of " -#~ "the guild." -#~ msgstr "" -#~ "参加しているすべてのギルドのオフラインメンバーも取得するために、 :func:`.on_ready` " -#~ "を遅延させるかどうかを表します。これが ``False`` の場合、オフラインメンバーの取得は行われず、 " -#~ ":meth:`request_offline_members` を使用してギルドのオフラインメンバーを取得する必要があります。" - -#~ msgid "" -#~ ":class:`float` -- Measures latency between " -#~ "a HEARTBEAT and a HEARTBEAT_ACK in " -#~ "seconds." -#~ msgstr ":class:`float` -- HEARTBEATとHEARTBEAT_ACK間の待ち時間を秒単位で測定します。" - -#~ msgid "List[:class:`.VoiceClient`] -- Represents a list of voice connections." -#~ msgstr "List[:class:`.VoiceClient`] -- 音声接続のリストを表します。" - -#~ msgid "" -#~ "Optional[Union[:class:`.Activity`, :class:`.Game`, " -#~ ":class:`.Streaming`]] -- The activity being" -#~ " used upon logging in." -#~ msgstr "" -#~ "Optional[Union[:class:`.Activity`, :class:`.Game`, " -#~ ":class:`.Streaming`]] -- ログイン時のアクティビティ。" - -#~ msgid "" -#~ "Optional[Union[:class:`.abc.GuildChannel`, " -#~ ":class:`.abc.PrivateChannel`]]: Returns a channel" -#~ " with the given ID." -#~ msgstr "" -#~ "Optional[Union[:class:`.abc.GuildChannel`, " -#~ ":class:`.abc.PrivateChannel`]]: 与えられたIDを持つチャンネルを返します。" - -#~ msgid "If not found, returns ``None``." -#~ msgstr "見つからない場合は、 ``None`` を返します。" - -#~ msgid ":exc:`.HTTPException` -- Getting the guilds failed." -#~ msgstr ":exc:`.HTTPException` -- ギルドの取得に失敗した。" - -#~ msgid "" -#~ "The activity parameter is a " -#~ ":class:`.Activity` object (not a string) " -#~ "that represents the activity being done" -#~ " currently. This could also be the" -#~ " slimmed down versions, :class:`.Game` and" -#~ " :class:`.Streaming`." -#~ msgstr "" -#~ "Activityパラメータは現在のアクティビティをあらわす:class:`.Activity` (文字列ではない) " -#~ "です。これはスリム化された :class:`.Game` や :class:`.Streaming`" -#~ " でもいいです。" - -#~ msgid ":exc:`.NotFound` -- Invalid Channel ID." -#~ msgstr ":exc:`.NotFound` -- チャンネルのIDが無効。" - -#~ msgid "" -#~ "Gets an arbitrary user's profile. This" -#~ " can only be used by non-bot" -#~ " accounts." -#~ msgstr "任意のユーザーのプロフィールを取得します。これはBotアカウント以外でのみ使用可能です。" - -#~ msgid ":exc:`.NotFound` -- Invalid webhook ID." -#~ msgstr ":exc:`.NotFound` -- WebhookのIDが無効。" - -#~ msgid "" -#~ ":exc:`.InvalidArgument` -- If any guild " -#~ "is unavailable or not large in the" -#~ " collection." -#~ msgstr ":exc:`.InvalidArgument` -- いずれかのギルドが利用できない、またはコレクション内のギルドが大きくない。" - -#~ msgid "" -#~ "List[Tuple[:class:`int`, :class:`float`]] -- A " -#~ "list of latencies between a HEARTBEAT" -#~ " and a HEARTBEAT_ACK in seconds." -#~ msgstr "" -#~ "List[Tuple[:class:`int`, :class:`float`]] -- " -#~ "HEARTBEATとHEARTBEAT_ACK間の待ち時間を秒単位で表したリスト。" - -#~ msgid "" -#~ "The activity parameter is a " -#~ ":class:`Activity` object (not a string) " -#~ "that represents the activity being done" -#~ " currently. This could also be the" -#~ " slimmed down versions, :class:`Game` and" -#~ " :class:`Streaming`." -#~ msgstr "" -#~ "activityパラメータは現在実行中のアクティビティを表す :class:`Activity` " -#~ "オブジェクト(文字列ではありません)です。これはスリムなダウンバージョン、 :class:`Game` や " -#~ ":class:`Streaming` でも構いません。" - -#~ msgid ":class:`int` -- The application ID." -#~ msgstr ":class:`int` -- アプリケーションID。" - -#~ msgid "" -#~ "Optional[List[:class:`str`]] -- A list of " -#~ "RPC origin URLs, if RPC is " -#~ "enabled." -#~ msgstr "Optional[List[:class:`str`]] -- RPCが有効になっている場合のRPCオリジンURLのリスト。" - -#~ msgid "" -#~ "In order to play audio, you must" -#~ " have loaded the opus library through" -#~ " :func:`opus.load_opus`." -#~ msgstr "オーディオの再生を行うためには :func:`opus.load_opus` を使用してopusライブラリをロードしておく必要があります。" - -#~ msgid "" -#~ "If you don't do this then the " -#~ "library will not be able to " -#~ "transmit audio." -#~ msgstr "ロードを行っていない場合、オーディオの送信ができません。" - -#~ msgid ":exc:`TypeError` -- Not an audio source." -#~ msgstr ":exc:`TypeError` -- オーディオソースでない。" - -#~ msgid "game playing" -#~ msgstr "遊んでいるゲーム" - -#~ msgid "" -#~ "A message was deleted by a " -#~ "moderator. Note that this only triggers" -#~ " if the message was deleted by " -#~ "either bulk delete or deletion by " -#~ "someone other than the author." -#~ msgstr "" - -#~ msgid ":class:`AuditLogAction` -- The action that was done." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`abc.User` -- The user who " -#~ "initiated this action. Usually a " -#~ ":class:`Member`\\, unless gone then it's " -#~ "a :class:`User`." -#~ msgstr "" - -#~ msgid ":class:`int` -- The entry ID." -#~ msgstr "" - -#~ msgid "" -#~ "*Any* -- The target that got " -#~ "changed. The exact type of this " -#~ "depends on the action being done." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The reason this action was done." -#~ msgstr "" - -#~ msgid "" -#~ "*Any* -- 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." -#~ msgstr "" - -#~ msgid ":class:`datetime.datetime` -- Returns the entry's creation time in UTC." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`AuditLogActionCategory`] -- The " -#~ "category of the action, if applicable." -#~ msgstr "" - -#~ msgid ":class:`AuditLogChanges` -- The list of changes this entry has." -#~ msgstr "" - -#~ msgid ":class:`AuditLogDiff` -- The target's prior state." -#~ msgstr "" - -#~ msgid ":class:`AuditLogDiff` -- The target's subsequent state." -#~ msgstr "" - -#~ msgid ":class:`str` – A name of something." -#~ msgstr "" - -#~ msgid ":class:`str` – A guild's icon hash. See also :attr:`Guild.icon`." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` – The guild's invite splash" -#~ " hash. See also :attr:`Guild.splash`." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`Member`, :class:`User`] – The " -#~ "guild's owner. See also :attr:`Guild.owner`" -#~ msgstr "" - -#~ msgid "" -#~ ":class:`VoiceRegion` – The guild's voice " -#~ "region. See also :attr:`Guild.region`." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`VoiceChannel`, :class:`Object`] – The" -#~ " guild's AFK channel." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`TextChannel`, :class:`Object`] – The" -#~ " guild's system channel." -#~ msgstr "" - -#~ msgid ":class:`int` – The guild's AFK timeout. See :attr:`Guild.afk_timeout`." -#~ msgstr "" - -#~ msgid ":class:`int` - The guild's MFA level. See :attr:`Guild.mfa_level`." -#~ msgstr "" - -#~ msgid ":class:`bool` – The guild's widget has been enabled or disabled." -#~ msgstr "" - -#~ msgid "Union[:class:`TextChannel`, :class:`Object`] – The widget's channel." -#~ msgstr "" - -#~ msgid ":class:`VerificationLevel` – The guild's verification level." -#~ msgstr "" - -#~ msgid ":class:`NotificationLevel` – The guild's default notification level." -#~ msgstr "" - -#~ msgid ":class:`ContentFilter` – The guild's content filter." -#~ msgstr "" - -#~ msgid ":class:`int` – The guild's default message notification setting." -#~ msgstr "" - -#~ msgid ":class:`str` – The guild's vanity URL." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` – The position of a " -#~ ":class:`Role` or :class:`abc.GuildChannel`." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`int`, :class:`str`] – The type" -#~ " of channel or channel permission " -#~ "overwrite." -#~ msgstr "" - -#~ msgid ":class:`int` – The bitrate of a :class:`VoiceChannel`." -#~ msgstr "" - -#~ msgid "" -#~ "List[Tuple[target, :class:`PermissionOverwrite`]] – " -#~ "A list of permission overwrite tuples" -#~ " that represents a target and a " -#~ ":class:`PermissionOverwrite` for said target." -#~ msgstr "" - -#~ msgid "" -#~ "List[Union[:class:`Role`, :class:`Object`]] – A " -#~ "list of roles being added or " -#~ "removed from a member." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] – The nickname of a member." -#~ msgstr "" - -#~ msgid ":class:`bool` – Whether the member is being server deafened." -#~ msgstr "" - -#~ msgid ":class:`bool` – Whether the member is being server muted." -#~ msgstr "" - -#~ msgid ":class:`bool` – Whether the role is being hoisted or not." -#~ msgstr "" - -#~ msgid ":class:`bool` – Whether the role is mentionable or not." -#~ msgstr "" - -#~ msgid ":class:`str` – The invite's code." -#~ msgstr "" - -#~ msgid "Union[:class:`abc.GuildChannel`, :class:`Object`] – A guild channel." -#~ msgstr "" - -#~ msgid ":class:`int` – The invite's max age in seconds." -#~ msgstr "" - -#~ msgid ":class:`bool` – If the invite is a temporary invite." -#~ msgstr "" - -#~ msgid ":class:`Permissions` – The permissions being allowed or denied." -#~ msgstr "" - -#~ msgid ":class:`int` – The ID of the object being changed." -#~ msgstr "" - -#~ msgid ":class:`str` – The avatar hash of a member." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` – The number of seconds " -#~ "members have to wait before sending " -#~ "another message in the channel." -#~ msgstr "" - -#~ msgid ":class:`int` -- The webhook's ID" -#~ msgstr "" - -#~ msgid ":class:`str` -- The authentication token of the webhook." -#~ msgstr "" - -#~ msgid "Optional[:class:`int`] -- The guild ID this webhook is for." -#~ msgstr "" - -#~ msgid "Optional[:class:`int`] -- The channel ID this webhook is for." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`abc.User`] -- The user this" -#~ " webhook was created by. If the " -#~ "webhook was received without authentication" -#~ " then this will be ``None``." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The default name of the webhook." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The default avatar of the webhook." -#~ msgstr "" - -#~ msgid "A partial webhook is just a webhook object with an ID and a token." -#~ msgstr "" - -#~ msgid ":exc:`InvalidArgument` -- The URL is invalid." -#~ msgstr "" - -#~ msgid "Optional[:class:`Guild`] -- The guild this webhook belongs to." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`TextChannel`] -- The text " -#~ "channel this webhook belongs to." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- Returns the " -#~ "webhook's creation time in UTC." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- Bad image format " -#~ "passed to ``format`` or invalid " -#~ "``size``." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Deleting the webhook failed." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- This webhook does not exist." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to delete this webhook." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Editing the webhook failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to edit this webhook." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Sending the message failed." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- This webhook was not found." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- The authorization token" -#~ " for the webhook is incorrect." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- You specified both" -#~ " ``embed`` and ``embeds`` or the " -#~ "length of ``embeds`` was invalid." -#~ msgstr "" - -#~ msgid ":class:`Webhook` -- The webhook that owns this adapter." -#~ msgstr "" - -#~ msgid ":class:`int` -- The model's unique ID." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- Returns the " -#~ "model's creation time as a naive " -#~ "datetime in UTC." -#~ msgstr "" - -#~ msgid ":class:`str` -- The user's discriminator." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The avatar hash the user has." -#~ msgstr "" - -#~ msgid ":class:`bool` -- If the user is a bot account." -#~ msgstr "" - -#~ msgid ":class:`str` -- Returns the user's display name." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- Returns a string that" -#~ " allows you to mention the given " -#~ "user." -#~ msgstr "" - -#~ msgid ":class:`str` -- The channel name." -#~ msgstr "" - -#~ msgid ":class:`~discord.Guild` -- The guild the channel belongs to." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The position in the " -#~ "channel list. This is a number " -#~ "that starts at 0. e.g. the top " -#~ "channel is position 0." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`~discord.Role`] -- Returns a list" -#~ " of roles that have been overridden" -#~ " from their default values in the " -#~ ":attr:`~discord.Guild.roles` attribute." -#~ msgstr "" - -#~ msgid ":class:`str` -- The string that allows you to mention the channel." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- Returns the " -#~ "channel's creation time in UTC." -#~ msgstr "" - -#~ msgid "" -#~ "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 key is the overwrite " -#~ "as a :class:`~discord.PermissionOverwrite`." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`~discord.CategoryChannel`] -- The " -#~ "category this channel belongs to." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have the proper permissions to create" -#~ " this channel." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Creating the channel failed." -#~ msgstr "" - -#~ msgid "" -#~ "You must have the " -#~ ":attr:`~.Permissions.create_instant_invite` permission to" -#~ " do this." -#~ msgstr "" - -#~ msgid "" -#~ "How long the invite should last. " -#~ "If it's 0 then the invite doesn't" -#~ " expire. Defaults to 0." -#~ msgstr "" - -#~ msgid "" -#~ "How many uses the invite could be" -#~ " used for. If it's 0 then there" -#~ " are unlimited uses. Defaults to 0." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Invite creation failed." -#~ msgstr "" - -#~ msgid "" -#~ "You must have :attr:`~.Permissions.manage_channels`" -#~ " permission to use this." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have proper permissions to delete the" -#~ " channel." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.NotFound` -- The channel was" -#~ " not found or was already deleted." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Deleting the channel failed." -#~ msgstr "" - -#~ msgid "" -#~ "You must have :attr:`~.Permissions.manage_guild` " -#~ "to get this information." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have proper permissions to get the " -#~ "information." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.HTTPException` -- An error " -#~ "occurred while fetching the information." -#~ msgstr "" - -#~ msgid "" -#~ "You must have the " -#~ ":attr:`~.Permissions.manage_roles` permission to use" -#~ " this." -#~ msgstr "" - -#~ msgid "The permissions to allow and deny to the target." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have permissions to edit channel " -#~ "specific permissions." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.HTTPException` -- Editing channel " -#~ "specific permissions failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.NotFound` -- The role or " -#~ "member being edited is not part of" -#~ " the guild." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.InvalidArgument` -- The overwrite " -#~ "parameter invalid or the target type " -#~ "was not :class:`~discord.Role` or " -#~ ":class:`~discord.Member`." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have permissions to get channel message" -#~ " history." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.HTTPException` -- The request " -#~ "to get message history failed." -#~ msgstr "" - -#~ msgid ":exc:`~discord.NotFound` -- The specified message was not found." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have the permissions required to get " -#~ "a message." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Retrieving the message failed." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Retrieving the pinned messages failed." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Sending the message failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have the proper permissions to send " -#~ "the message." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.InvalidArgument` -- The ``files`` " -#~ "list is not of the appropriate " -#~ "size or you specified both ``file`` " -#~ "and ``files``." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- Bad image format " -#~ "passed to ``format`` or ``static_format``, " -#~ "or invalid ``size``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Colour` -- A property that " -#~ "returns a color denoting the rendered" -#~ " color for the user. This always " -#~ "returns :meth:`Colour.default`." -#~ msgstr "" - -#~ msgid "There is an alias for this named :meth:`colour`." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Colour` -- A property that " -#~ "returns a colour denoting the rendered" -#~ " colour for the user. This always " -#~ "returns :meth:`Colour.default`." -#~ msgstr "" - -#~ msgid "There is an alias for this named :meth:`color`." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`ClientException` -- Attempted to create" -#~ " a group with only one recipient. " -#~ "This does not include yourself." -#~ msgstr "" - -#~ msgid ":class:`datetime.datetime` -- Returns the user's creation time in UTC." -#~ msgstr "" - -#~ msgid "" -#~ "*class* -- `DefaultAvatar` -- Returns " -#~ "the default avatar for a given " -#~ "user. This is calculated by the " -#~ "user's discriminator." -#~ msgstr "" - -#~ msgid ":class:`Asset` -- Returns a URL for a user's default avatar." -#~ msgstr "" - -#~ msgid "Indicates if the user has an animated avatar." -#~ msgstr "" - -#~ msgid ":class:`User` -- The user you have the relationship with." -#~ msgstr "" - -#~ msgid ":class:`RelationshipType` -- The type of relationship you have." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Accepting the relationship failed." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Deleting the relationship failed." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`DMChannel`] -- Returns the " -#~ "channel associated with this user if " -#~ "it exists." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- Not allowed to block this user." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Blocking the user failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- Not allowed to get mutual friends of this user." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Getting mutual friends failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- Not allowed to fetch profiles." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Fetching the profile failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- Not allowed to remove this user as a friend." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Removing the user as a friend failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- Not allowed to send a friend request to the user." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Sending the friend request failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- Not allowed to unblock this user." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Unblocking the user failed." -#~ msgstr "" - -#~ msgid "Checks if the user is your friend." -#~ msgstr "" - -#~ msgid "Checks if the user is blocked." -#~ msgstr "" - -#~ msgid ":class:`int` -- The attachment ID." -#~ msgstr "" - -#~ msgid ":class:`int` -- The attachment size in bytes." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The attachment's " -#~ "height, in pixels. Only applicable to" -#~ " images." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The attachment's " -#~ "width, in pixels. Only applicable to " -#~ "images." -#~ msgstr "" - -#~ msgid ":class:`str` -- The attachment's filename." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The attachment URL. If" -#~ " the message this attachment was " -#~ "attached to is deleted, then this " -#~ "will 404." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- 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." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Downloading the attachment failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "permissions to access this attachment" -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- The attachment was deleted." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Saving the attachment failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`DiscordException` -- There was no " -#~ "valid URL or internal connection state." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Downloading the asset failed." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- The asset was deleted." -#~ msgstr "" - -#~ msgid "Same as :meth:`read`." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- 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." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`MessageType` -- 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`." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`abc.User` -- 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." -#~ msgstr "" - -#~ msgid ":class:`str` -- The actual contents of the message." -#~ msgstr "" - -#~ msgid "List[:class:`Embed`] -- A list of embeds the message has." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`abc.Messageable`] -- The " -#~ ":class:`TextChannel` that the message was " -#~ "sent from. Could be a :class:`DMChannel`" -#~ " or :class:`GroupChannel` if it's a " -#~ "private message." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`CallMessage`] -- The call " -#~ "that the message refers to. This " -#~ "is only applicable to messages of " -#~ "type :attr:`MessageType.call`." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Specifies if the message mentions everyone." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`abc.User`] -- 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`." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`abc.GuildChannel`] -- A list of" -#~ " :class:`abc.GuildChannel` that were mentioned." -#~ " If the message is in a private" -#~ " message then the list is always " -#~ "empty." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`Role`] -- A list of " -#~ ":class:`Role` that were mentioned. If " -#~ "the message is in a private " -#~ "message then the list is always " -#~ "empty." -#~ msgstr "" - -#~ msgid ":class:`int` -- The message ID." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- If this message " -#~ "was sent by a webhook, then this" -#~ " is the webhook ID's that sent " -#~ "this message." -#~ msgstr "" - -#~ msgid "List[:class:`Attachment`] -- A list of attachments given to a message." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Specifies if the message is currently pinned." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`Reaction`] -- Reactions to a " -#~ "message. Reactions can be either custom" -#~ " emoji or standard unicode emoji." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`dict`] -- 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." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`dict`] -- The rich presence" -#~ " enabled application associated with this" -#~ " message." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`Guild`] -- The guild that " -#~ "the message belongs to, if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`int`] -- A property that " -#~ "returns an array of user IDs " -#~ "matched with the syntax of " -#~ "``<@user_id>`` in the message content." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`int`] -- A property that " -#~ "returns an array of channel IDs " -#~ "matched with the syntax of " -#~ "``<#channel_id>`` in the message content." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`int`] -- A property that " -#~ "returns an array of role IDs " -#~ "matched with the syntax of " -#~ "``<@&role_id>`` in the message content." -#~ msgstr "" - -#~ msgid ":class:`datetime.datetime` -- The message's creation time in UTC." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- A naive " -#~ "UTC datetime object containing the " -#~ "edited time of the message." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- Returns a URL that " -#~ "allows the client to jump to this" -#~ " message." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Acking failed." -#~ msgstr "" - -#~ msgid ":exc:`ClientException` -- You must not be a bot user." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Adding the reaction failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "the proper permissions to react to " -#~ "the message." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- The emoji you specified was not found." -#~ msgstr "" - -#~ msgid ":exc:`InvalidArgument` -- The emoji parameter is invalid." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Removing the reactions failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "the proper permissions to remove all " -#~ "the reactions." -#~ msgstr "" - -#~ msgid "" -#~ "If provided, the number of seconds " -#~ "to wait in the background before " -#~ "deleting the message." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "proper permissions to delete the " -#~ "message." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Deleting the message failed." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Editing the message failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to pin the message." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- The message or channel was not found or deleted." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`HTTPException` -- Pinning the message" -#~ " failed, probably due to the channel" -#~ " having more than 50 pinned messages." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Removing the reaction failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "the proper permissions to remove the " -#~ "reaction." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- The member or emoji you specified was not found." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to unpin the message." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Unpinning the message failed." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`Emoji`, :class:`str`] -- The " -#~ "reaction emoji. May be a custom " -#~ "emoji, or a unicode emoji." -#~ msgstr "" - -#~ msgid ":class:`int` -- Number of times this reaction was made" -#~ msgstr "" - -#~ msgid ":class:`bool` -- If the user sent this reaction." -#~ msgstr "" - -#~ msgid ":class:`Message` -- Message this reaction is for." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Getting the users for the reaction failed." -#~ msgstr "" - -#~ msgid ":class:`bool` -- If this is a custom emoji." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`NotFound` -- The user you " -#~ "specified, or the reaction's message was" -#~ " not found." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- A naive " -#~ "UTC datetime object that represents the" -#~ " time that the call has ended." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`User`] -- The list of users" -#~ " that are participating in this call." -#~ msgstr "" - -#~ msgid ":class:`Message` -- The message associated with this call message." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Indicates if the call has ended." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`GroupChannel`\\ -- The private channel" -#~ " associated with this message." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`CallMessage` -- The call message " -#~ "associated with this group call." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Denotes if this group call is unavailable." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`User`] -- A list of users" -#~ " that are currently being rung to " -#~ "join the call." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`VoiceRegion` -- The guild region " -#~ "the group call is being hosted on." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`User`] -- A property that " -#~ "returns all users that are currently " -#~ "in this call." -#~ msgstr "" - -#~ msgid ":class:`GroupChannel`\\ -- Returns the channel the group call is in." -#~ msgstr "" - -#~ msgid ":class:`str` -- The guild name." -#~ msgstr "" - -#~ msgid "Tuple[:class:`Emoji`, ...] -- All emojis that the guild owns." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`VoiceRegion` -- The region the " -#~ "guild belongs on. There is a " -#~ "chance that the region will be a" -#~ " :class:`str` if the value is not " -#~ "recognised by the enumerator." -#~ msgstr "" - -#~ msgid ":class:`int` -- The timeout to get sent to the AFK channel." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`VoiceChannel`] -- The channel " -#~ "that denotes the AFK channel. None " -#~ "if it doesn't exist." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The guild's icon." -#~ msgstr "" - -#~ msgid ":class:`int` -- The guild's ID." -#~ msgstr "" - -#~ msgid ":class:`int` -- The guild owner's ID. Use :attr:`Guild.owner` instead." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates if the guild" -#~ " is unavailable. If this is ``True``" -#~ " then the reliability of other " -#~ "attributes outside of :meth:`Guild.id` is " -#~ "slim and they might all be None." -#~ " It is best to not do anything" -#~ " with the guild if it is " -#~ "unavailable." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The maximum amount" -#~ " of presences for the guild." -#~ msgstr "" - -#~ msgid "Optional[:class:`int`] -- The maximum amount of members for the guild." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The guild's banner." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The guild's description." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- Indicates the guild's " -#~ "two factor authorisation level. If this" -#~ " value is 0 then the guild does" -#~ " not require 2FA for their " -#~ "administrative members. If the value is" -#~ " 1 then they do." -#~ msgstr "" - -#~ msgid ":class:`VerificationLevel` -- The guild's verification level." -#~ msgstr "" - -#~ msgid ":class:`ContentFilter` -- The guild's explicit content filter." -#~ msgstr "" - -#~ msgid ":class:`NotificationLevel` -- The guild's notification settings." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`str`] -- A list of features" -#~ " that the guild has. They are " -#~ "currently as follows:" -#~ msgstr "" - -#~ msgid "``LURKABLE``: Users can lurk in this guild via Server Discovery." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The guild's invite splash." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The premium tier for " -#~ "this guild. Corresponds to \"Nitro " -#~ "Server\" in the official UI. The " -#~ "number goes from 0 to 3 inclusive." -#~ msgstr "" - -#~ msgid ":class:`int` -- How many users have currently \"boosted\" this guild." -#~ msgstr "" - -#~ msgid "" -#~ "If set to ``True``, return entries " -#~ "in oldest->newest order. Defaults to " -#~ "True if ``after`` is specified, " -#~ "otherwise ``False``." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You are not allowed to fetch audit logs" -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`HTTPException` -- An error occurred " -#~ "while fetching the audit logs." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`abc.GuildChannel`] -- A list of" -#~ " channels that belongs to this guild." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Indicates if the guild is a 'large' guild." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`VoiceChannel`] -- A list of " -#~ "voice channels that belongs to this " -#~ "guild." -#~ msgstr "" - -#~ msgid "Returns the :class:`VoiceClient` associated with this guild, if any." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`TextChannel`] -- A list of " -#~ "text channels that belongs to this " -#~ "guild." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`CategoryChannel`] -- A list of" -#~ " categories that belongs to this " -#~ "guild." -#~ msgstr "" - -#~ msgid "" -#~ "Returns a :class:`abc.GuildChannel` with the" -#~ " given ID. If not found, returns " -#~ "None." -#~ msgstr "" - -#~ msgid ":class:`int` -- The maximum number of emoji slots this guild has." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`float` -- The maximum bitrate " -#~ "for voice channels this guild can " -#~ "have." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The maximum number of" -#~ " bytes files can have when uploaded" -#~ " to this guild." -#~ msgstr "" - -#~ msgid "List[:class:`Member`] -- A list of members that belong to this guild." -#~ msgstr "" - -#~ msgid "" -#~ "Returns a :class:`Member` with the given" -#~ " ID. If not found, returns None." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`Member`] -- A list of " -#~ "members who have \"boosted\" this guild." -#~ msgstr "" - -#~ msgid "Returns a :class:`Role` with the given ID. If not found, returns None." -#~ msgstr "" - -#~ msgid ":class:`Member` -- The member that owns the guild." -#~ msgstr "" - -#~ msgid ":class:`Asset` -- Returns the guild's icon asset." -#~ msgstr "" - -#~ msgid ":class:`Asset` -- Returns the guild's banner asset." -#~ msgstr "" - -#~ msgid ":class:`Asset` -- Returns the guild's invite splash asset." -#~ msgstr "" - -#~ msgid ":class:`int` -- Returns the shard ID for this guild if applicable." -#~ msgstr "" - -#~ msgid ":class:`datetime.datetime` -- Returns the guild's creation time in UTC." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`TextChannel`] -- Returns the " -#~ "guild's channel used for system " -#~ "messages." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have the proper permissions to ban." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Banning failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "proper permissions to get the " -#~ "information." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`HTTPException` -- An error occurred " -#~ "while fetching the information." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You are not allowed to create emojis." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- An error occurred creating an emoji." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to create the role." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Creating the role failed." -#~ msgstr "" - -#~ msgid ":exc:`InvalidArgument` -- An invalid keyword argument was given." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "the proper permissions to create this" -#~ " channel." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Creating the channel failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- The permission " -#~ "overwrite information is not in proper" -#~ " form." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Deleting the guild failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to delete the guild." -#~ msgstr "" - -#~ msgid "" -#~ "The new description of the guild. " -#~ "This is only available to guilds " -#~ "that contain `VERIFIED` in " -#~ ":attr:`Guild.features`." -#~ msgstr "" - -#~ msgid "" -#~ "A :term:`py:bytes-like object` representing" -#~ " the icon. Only PNG/JPEG supported. " -#~ "Could be ``None`` to denote removal " -#~ "of the icon." -#~ msgstr "" - -#~ msgid "" -#~ "A :term:`py:bytes-like object` representing" -#~ " the invite splash. Only PNG/JPEG " -#~ "supported. Could be ``None`` to denote" -#~ " removing the splash. Only available " -#~ "for partnered guilds with ``INVITE_SPLASH``" -#~ " feature." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to edit the guild." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Editing the guild failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- 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." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to prune members." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`HTTPException` -- An error occurred " -#~ "while fetching the prune members " -#~ "estimate." -#~ msgstr "" - -#~ msgid ":exc:`InvalidArgument` -- An integer was not passed for ``days``." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- This user is not banned." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidData` -- An unknown channel " -#~ "type was received from Discord." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Retrieving the channels failed." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- The emoji requested could not be found." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- An error occurred fetching the emoji." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- An error occurred fetching the emojis." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have access to the guild." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Getting the guild failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have the proper permissions to kick." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Kicking failed." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Leaving the guild failed." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- An error occurred while pruning members." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have the proper permissions to unban." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Unbanning failed." -#~ msgstr "" - -#~ msgid "" -#~ "The guild must be partnered, i.e. " -#~ "have 'VANITY_URL' in :attr:`~Guild.features`." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have the proper permissions to get this." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Retrieving the vanity invite failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You don't have permissions to get the webhooks." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- The widget for this guild is disabled." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Retrieving the widget failed." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`SystemChannelFlags` -- Returns the " -#~ "guild's system channel settings." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- A datetime" -#~ " object that specifies the date and" -#~ " time in UTC that the member " -#~ "joined the guild for the first " -#~ "time. In certain cases, this can " -#~ "be ``None``." -#~ msgstr "" - -#~ msgid "" -#~ "Tuple[Union[:class:`Game`, :class:`Streaming`, " -#~ ":class:`Spotify`, :class:`Activity`]] -- The " -#~ "activities that the user is currently" -#~ " doing." -#~ msgstr "" - -#~ msgid ":class:`Guild` -- The guild that the member belongs to." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The guild specific nickname of the user." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- A 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``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Status` -- The member's overall " -#~ "status. If the value is unknown, " -#~ "then it will be a :class:`str` " -#~ "instead." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Status` -- The member's status " -#~ "on a mobile device, if applicable." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Status` -- The member's status " -#~ "on the desktop client, if applicable." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Status` -- The member's status " -#~ "on the web client, if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "A helper function that determines if " -#~ "a member is active on a mobile " -#~ "device." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Colour` -- 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." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Colour` -- 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." -#~ msgstr "" - -#~ msgid ":class:`str` -- Returns a string that allows you to mention the member." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`Game`, :class:`Streaming`, :class:`Spotify`," -#~ " :class:`Activity`] -- Returns the primary" -#~ " activity the user is currently " -#~ "doing. Could be None if no " -#~ "activity is being done." -#~ msgstr "" - -#~ msgid ":class:`Role` -- Returns the member's highest role." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`VoiceState`] -- Returns the " -#~ "member's current voice state." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to add these roles." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Adding roles failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "the proper permissions to the action " -#~ "requested." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- The operation failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to remove these roles." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Removing the roles failed." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`Role`] -- 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." -#~ msgstr "" - -#~ msgid "There is an alias for this named :meth:`color`" -#~ msgstr "" - -#~ msgid "There is an alias for this named :meth:`colour`" -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The activity's name. " -#~ "This will always return \"Spotify\"." -#~ msgstr "" - -#~ msgid ":class:`str` -- The title of the song being played." -#~ msgstr "" - -#~ msgid "List[:class:`str`] -- The artists of the song being played." -#~ msgstr "" - -#~ msgid ":class:`str` -- The artist of the song being played." -#~ msgstr "" - -#~ msgid ":class:`str` -- The album that the song being played belongs to." -#~ msgstr "" - -#~ msgid ":class:`str` -- The album cover image URL from Spotify's CDN." -#~ msgstr "" - -#~ msgid ":class:`str` -- The track ID used by Spotify to identify this song." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- When the user" -#~ " started playing this song in UTC." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- When the user" -#~ " will stop playing this song in " -#~ "UTC." -#~ msgstr "" - -#~ msgid ":class:`datetime.timedelta` -- The duration of the song being played." -#~ msgstr "" - -#~ msgid ":class:`str` -- The party ID of the listening party." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates if the user" -#~ " is currently deafened by the guild." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Indicates if the user is currently muted by the guild." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates if the user" -#~ " is currently muted by their own " -#~ "accord." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates if the user" -#~ " is currently deafened by their own" -#~ " accord." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Indicates if the user is currently broadcasting video." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates if the user" -#~ " is currently in the AFK channel " -#~ "in the guild." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`VoiceChannel` -- The voice channel " -#~ "that the user is currently connected " -#~ "to. None if the user is not " -#~ "currently in a voice channel." -#~ msgstr "" - -#~ msgid ":class:`str` -- The name of the emoji." -#~ msgstr "" - -#~ msgid ":class:`int` -- The emoji's ID." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- If colons are required" -#~ " to use this emoji in the " -#~ "client (:PJSalt: vs PJSalt)." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether an emoji is animated or not." -#~ msgstr "" - -#~ msgid ":class:`bool` -- If this emoji is managed by a Twitch integration." -#~ msgstr "" - -#~ msgid ":class:`int` -- The guild ID the emoji belongs to." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether the emoji is available for use." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`User`] -- The user that " -#~ "created the emoji. This can only " -#~ "be retrieved using :meth:`Guild.fetch_emoji` " -#~ "and having the :attr:`~Permissions.manage_emojis`" -#~ " permission." -#~ msgstr "" - -#~ msgid ":class:`datetime.datetime` -- Returns the emoji's creation time in UTC." -#~ msgstr "" - -#~ msgid ":class:`Asset` -- Returns the asset of the emoji." -#~ msgstr "" - -#~ msgid ":class:`Guild` -- The guild this emoji belongs to." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You are not allowed to delete emojis." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- An error occurred deleting the emoji." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You are not allowed to edit emojis." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- An error occurred editing the emoji." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`Role`] -- A :class:`list` of " -#~ "roles that is allowed to use this" -#~ " emoji." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The custom emoji name," -#~ " if applicable, or the unicode " -#~ "codepoint of the non-custom emoji." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether the emoji is animated or not." -#~ msgstr "" - -#~ msgid "Optional[:class:`int`] -- The ID of the custom emoji, if applicable." -#~ msgstr "" - -#~ msgid "Checks if this is a custom non-Unicode emoji." -#~ msgstr "" - -#~ msgid "Checks if this is a Unicode emoji." -#~ msgstr "" - -#~ msgid ":class:`Asset` -- Returns an asset of the emoji, if it is custom." -#~ msgstr "" - -#~ msgid ":class:`int` -- The ID for the role." -#~ msgstr "" - -#~ msgid ":class:`str` -- The name of the role." -#~ msgstr "" - -#~ msgid ":class:`Permissions` -- Represents the role's permissions." -#~ msgstr "" - -#~ msgid ":class:`Guild` -- The guild the role belongs to." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Colour` -- Represents the role " -#~ "colour. An alias exists under ``color``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates if the role" -#~ " will be displayed separately from " -#~ "other members." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The position of the " -#~ "role. This number is usually positive." -#~ " The bottom role has a position " -#~ "of 0." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates if the role" -#~ " is managed by the guild through " -#~ "some form of integrations such as " -#~ "Twitch." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Indicates if the role can be mentioned by users." -#~ msgstr "" - -#~ msgid "Checks if the role is the default role." -#~ msgstr "" - -#~ msgid ":class:`datetime.datetime` -- Returns the role's creation time in UTC." -#~ msgstr "" - -#~ msgid ":class:`str` -- Returns a string that allows you to mention a role." -#~ msgstr "" - -#~ msgid "List[:class:`Member`] -- Returns all the members with this role." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to delete the role." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Deleting the role failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to change the role." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Editing the role failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- An invalid position" -#~ " was given or the default role " -#~ "was asked to be moved." -#~ msgstr "" - -#~ msgid ":class:`Guild` -- The guild the channel belongs to." -#~ msgstr "" - -#~ msgid ":class:`int` -- The channel ID." -#~ msgstr "" - -#~ msgid ":class:`int` -- The category channel ID this channel belongs to." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- The channel's topic." -#~ " None if it doesn't exist." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The last message " -#~ "ID of the message sent to this " -#~ "channel. It may *not* point to an" -#~ " existing or valid message." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- 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." -#~ msgstr "" - -#~ msgid ":class:`ChannelType` -- The channel's Discord type." -#~ msgstr "" - -#~ msgid "List[:class:`Member`] -- Returns all members that can see this channel." -#~ msgstr "" - -#~ msgid "Checks if the channel is NSFW." -#~ msgstr "" - -#~ msgid "Checks if the channel is a news channel." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Creating the webhook failed." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to create a webhook." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`ClientException` -- The number of " -#~ "messages to delete was more than " -#~ "100." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "proper permissions to delete the " -#~ "messages or you're not using a bot" -#~ " account." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Deleting the messages failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- If position is " -#~ "less than 0 or greater than the" -#~ " number of channels." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to edit the channel." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Editing the channel failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Forbidden` -- You do not have " -#~ "proper permissions to do the actions " -#~ "required." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Purging the messages failed." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The channel's preferred " -#~ "audio bitrate in bits per second." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The channel's limit for" -#~ " number of members that can be " -#~ "in a voice channel." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`Member`] -- Returns all members" -#~ " that are currently inside this voice" -#~ " channel." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`asyncio.TimeoutError` -- Could not " -#~ "connect to the voice channel in " -#~ "time." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.ClientException` -- You are " -#~ "already connected to a voice channel." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.opus.OpusNotLoaded` -- The opus " -#~ "library has not been loaded." -#~ msgstr "" - -#~ msgid ":class:`~discord.VoiceClient`" -#~ msgstr "" - -#~ msgid ":class:`str` -- The category name." -#~ msgstr "" - -#~ msgid ":class:`Guild` -- The guild the category belongs to." -#~ msgstr "" - -#~ msgid ":class:`int` -- The category channel ID." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The position in the " -#~ "category list. This is a number " -#~ "that starts at 0. e.g. the top " -#~ "category is position 0." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`abc.GuildChannel`] -- Returns the " -#~ "channels that are under this category." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`TextChannel`] -- Returns the text" -#~ " channels that are under this " -#~ "category." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`VoiceChannel`] -- Returns the " -#~ "voice channels that are under this " -#~ "category." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`InvalidArgument` -- If position is " -#~ "less than 0 or greater than the" -#~ " number of categories." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to edit the category." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Editing the category failed." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`User` -- The user you are " -#~ "participating with in the direct message" -#~ " channel." -#~ msgstr "" - -#~ msgid ":class:`ClientUser` -- The user presenting yourself." -#~ msgstr "" - -#~ msgid ":class:`int` -- The direct message channel ID." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`User`] -- The users you are" -#~ " participating with in the group " -#~ "channel." -#~ msgstr "" - -#~ msgid ":class:`int` -- The group channel ID." -#~ msgstr "" - -#~ msgid ":class:`User` -- The user that owns the group channel." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The group channel's icon hash if provided." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The group channel's name if provided." -#~ msgstr "" - -#~ msgid ":class:`Asset` -- Returns the channel's icon asset if available." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Adding a recipient to this group failed." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Editing the group failed." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Leaving the group failed." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Removing a recipient from this group failed." -#~ msgstr "" - -#~ msgid ":class:`str` -- The partial guild's name." -#~ msgstr "" - -#~ msgid ":class:`int` -- The partial guild's ID." -#~ msgstr "" - -#~ msgid ":class:`VerificationLevel` -- The partial guild's verification level." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`str`] -- A list of features" -#~ " the guild has. See :attr:`Guild.features`" -#~ " for more information." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The partial guild's icon." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The partial guild's banner." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The partial guild's invite splash." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The partial guild's description." -#~ msgstr "" - -#~ msgid ":class:`str` -- The partial channel's name." -#~ msgstr "" - -#~ msgid ":class:`int` -- The partial channel's ID." -#~ msgstr "" - -#~ msgid ":class:`ChannelType` -- The partial channel's type." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- How long the before " -#~ "the invite expires in seconds. A " -#~ "value of 0 indicates that it " -#~ "doesn't expire." -#~ msgstr "" - -#~ msgid ":class:`str` -- The URL fragment used for the invite." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`Guild`, :class:`PartialInviteGuild`] -- " -#~ "The guild the invite is for." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Indicates if the invite has been revoked." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- A datetime " -#~ "object denoting the time the invite " -#~ "was created." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Indicates that the " -#~ "invite grants temporary membership. If " -#~ "``True``, members who joined via this" -#~ " invite will be kicked upon " -#~ "disconnect." -#~ msgstr "" - -#~ msgid ":class:`int` -- How many times the invite has been used." -#~ msgstr "" - -#~ msgid ":class:`int` -- How many times the invite can be used." -#~ msgstr "" - -#~ msgid ":class:`User` -- The user who created the invite." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The approximate " -#~ "number of members in the guild." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The approximate " -#~ "number of members currently active in" -#~ " the guild. This includes idle, dnd," -#~ " online, and invisible members. Offline " -#~ "members are excluded." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`abc.GuildChannel`, :class:`PartialInviteChannel`]" -#~ " -- The channel the invite is " -#~ "for." -#~ msgstr "" - -#~ msgid ":class:`str` -- Returns the proper code portion of the invite." -#~ msgstr "" - -#~ msgid ":class:`str` -- A property that retrieves the invite URL." -#~ msgstr "" - -#~ msgid ":exc:`Forbidden` -- You do not have permissions to revoke invites." -#~ msgstr "" - -#~ msgid ":exc:`NotFound` -- The invite is invalid or expired." -#~ msgstr "" - -#~ msgid ":exc:`HTTPException` -- Revoking the invite failed." -#~ msgstr "" - -#~ msgid ":class:`int` -- The channel's ID." -#~ msgstr "" - -#~ msgid ":class:`str` -- The channel's name." -#~ msgstr "" - -#~ msgid ":class:`int` -- The channel's position" -#~ msgstr "" - -#~ msgid ":class:`int` -- The member's ID." -#~ msgstr "" - -#~ msgid ":class:`str` -- The member's username." -#~ msgstr "" - -#~ msgid ":class:`str` -- The member's discriminator." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether the member is a bot." -#~ msgstr "" - -#~ msgid ":class:`Status` -- The member's status." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The member's nickname." -#~ msgstr "" - -#~ msgid "Optional[:class:`str`] -- The member's avatar hash." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[Union[:class:`Activity`, :class:`Game`, " -#~ ":class:`Streaming`, :class:`Spotify`]] -- The " -#~ "member's activity." -#~ msgstr "" - -#~ msgid "Optional[:class:`bool`] -- Whether the member is currently deafened." -#~ msgstr "" - -#~ msgid "Optional[:class:`bool`] -- Whether the member is currently muted." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`bool`] -- Whether the member" -#~ " is currently being suppressed." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`VoiceChannel`] -- Which channel " -#~ "the member is connected to." -#~ msgstr "" - -#~ msgid ":class:`str` -- Returns the member's display name." -#~ msgstr "" - -#~ msgid ":class:`str` -- The guild's name." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[List[:class:`WidgetChannel`]] -- The " -#~ "accessible voice channels in the guild." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[List[:class:`Member`]] -- The online " -#~ "members in the server. Offline members" -#~ " do not appear in the widget." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- Returns the " -#~ "member's creation time in UTC." -#~ msgstr "" - -#~ msgid ":class:`str` -- The JSON URL of the widget." -#~ msgstr "" - -#~ msgid "Optiona[:class:`str`] -- The invite URL for the guild, if available." -#~ msgstr "" - -#~ msgid ":class:`int` -- The channel ID where the deletion took place." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The guild ID " -#~ "where the deletion took place, if " -#~ "applicable." -#~ msgstr "" - -#~ msgid ":class:`int` -- The message ID that got deleted." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`Message`] -- The cached " -#~ "message, if found in the internal " -#~ "message cache." -#~ msgstr "" - -#~ msgid "" -#~ "Set[:class:`int`] -- A :class:`set` of " -#~ "the message IDs that were deleted." -#~ msgstr "" - -#~ msgid ":class:`int` -- The channel ID where the message got deleted." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The guild ID " -#~ "where the message got deleted, if " -#~ "applicable." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`Message`] -- The cached messages," -#~ " if found in the internal message " -#~ "cache." -#~ msgstr "" - -#~ msgid ":class:`int` -- The message ID that got updated." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- The raw data given " -#~ "by the `gateway " -#~ "`_" -#~ msgstr "" - -#~ msgid ":class:`int` -- The message ID that got or lost a reaction." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The user ID who " -#~ "added the reaction or whose reaction " -#~ "was removed." -#~ msgstr "" - -#~ msgid ":class:`int` -- The channel ID where the reaction got added or removed." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- The guild ID " -#~ "where the reaction got added or " -#~ "removed, if applicable." -#~ msgstr "" - -#~ msgid ":class:`PartialEmoji` -- The custom or unicode emoji being used." -#~ msgstr "" - -#~ msgid ":class:`int` -- The message ID that got its reactions cleared." -#~ msgstr "" - -#~ msgid ":class:`int` -- The channel ID where the reactions got cleared." -#~ msgstr "" - -#~ msgid "Optional[:class:`int`] -- The guild ID where the reactions got cleared." -#~ msgstr "" - -#~ msgid "" -#~ "Unlike :ref:`models ` you " -#~ "are allowed to create these yourself," -#~ " even if they can also be used" -#~ " to hold attributes." -#~ msgstr "" - -#~ msgid ":class:`str` -- The ID of the object." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- Returns the " -#~ "snowflake's creation time in UTC." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The title of the " -#~ "embed. This can be set during " -#~ "initialisation." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The type of embed. " -#~ "Usually \"rich\". This can be set " -#~ "during initialisation." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The description of the" -#~ " embed. This can be set during " -#~ "initialisation." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The URL of the " -#~ "embed. This can be set during " -#~ "initialisation." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`datetime.datetime` -- The timestamp of" -#~ " the embed content. This could be " -#~ "a naive or aware datetime." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`Colour`, :class:`int`] -- The " -#~ "colour code of the embed. Aliased " -#~ "to ``color`` as well. This can be" -#~ " set during initialisation." -#~ msgstr "" - -#~ msgid ":exc:`IndexError` -- An invalid index was provided." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`str`, :class:`io.BufferedIOBase`] -- A" -#~ " file-like object opened in binary" -#~ " mode and read mode or a " -#~ "filename representing a file in the " -#~ "hard drive to open." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- 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." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether the attachment is a spoiler." -#~ msgstr "" - -#~ msgid "" -#~ "Represents a Discord role colour. This" -#~ " class is similar to an (red, " -#~ "green, blue) :class:`tuple`." -#~ msgstr "" - -#~ msgid ":class:`int` -- The raw integer colour value." -#~ msgstr "" - -#~ msgid ":class:`int` -- Returns the red component of the colour." -#~ msgstr "" - -#~ msgid ":class:`int` -- Returns the green component of the colour." -#~ msgstr "" - -#~ msgid ":class:`int` -- Returns the blue component of the colour." -#~ msgstr "" - -#~ msgid "A factory method that returns a :class:`Colour` with a value of 0." -#~ msgstr "" - -#~ msgid ":class:`int` -- The application ID of the game." -#~ msgstr "" - -#~ msgid ":class:`str` -- The name of the activity." -#~ msgstr "" - -#~ msgid ":class:`str` -- A stream URL that the activity could be doing." -#~ msgstr "" - -#~ msgid ":class:`ActivityType` -- The type of activity currently being done." -#~ msgstr "" - -#~ msgid ":class:`str` -- The user's current state. For example, \"In Game\"." -#~ msgstr "" - -#~ msgid ":class:`str` -- The detail of the user's current activity." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- A dictionary of " -#~ "timestamps. It contains the following " -#~ "optional keys:" -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- A dictionary representing " -#~ "the images and their hover text of" -#~ " an activity. It contains the " -#~ "following optional keys:" -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- A dictionary representing " -#~ "the activity party. It contains the " -#~ "following optional keys:" -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- When the " -#~ "user started doing this activity in " -#~ "UTC, if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- When the " -#~ "user will stop doing this activity " -#~ "in UTC, if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- Returns a URL " -#~ "pointing to the large image asset " -#~ "of this activity if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- Returns a URL " -#~ "pointing to the small image asset " -#~ "of this activity if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- Returns the large" -#~ " image asset hover text of this " -#~ "activity if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- Returns the small" -#~ " image asset hover text of this " -#~ "activity if applicable." -#~ msgstr "" - -#~ msgid ":class:`str` -- The game's name." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- When the " -#~ "user started playing this game in " -#~ "UTC, if applicable." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`datetime.datetime`] -- When the " -#~ "user will stop playing this game " -#~ "in UTC, if applicable." -#~ msgstr "" - -#~ msgid ":class:`str` -- The stream's name." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The stream's URL. " -#~ "Currently only twitch.tv URLs are " -#~ "supported. Anything else is silently " -#~ "discarded." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- If provided, " -#~ "typically the game the streamer is " -#~ "playing." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- A dictionary comprising " -#~ "of similar keys than those in " -#~ ":attr:`Activity.assets`." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- If provided, the " -#~ "twitch name of the user streaming." -#~ msgstr "" - -#~ msgid "" -#~ "Returns an iterator of ``(perm, value)``" -#~ " pairs. This allows it to be, " -#~ "for example, constructed as a dict " -#~ "or a list of pairs." -#~ msgstr "" - -#~ msgid "" -#~ "A factory method that creates a " -#~ ":class:`Permissions` with all permissions set" -#~ " to True." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if the" -#~ " user can create instant invites." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if the" -#~ " user can kick users from the " -#~ "guild." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can ban users from the " -#~ "guild." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user is an administrator. This role" -#~ " overrides all other permissions." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can edit, delete, or create " -#~ "channels in the guild." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Returns ``True`` if a user can edit guild properties." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can add reactions to messages." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can view the guild's audit " -#~ "log." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can be more easily heard " -#~ "while talking." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can stream in a voice " -#~ "channel." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can read messages from all " -#~ "or specific text channels." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can send messages from all " -#~ "or specific text channels." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can send TTS messages from " -#~ "all or specific text channels." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can delete or pin messages " -#~ "in a text channel." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user's messages will automatically be " -#~ "embedded by Discord." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can send files in their " -#~ "messages." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can read a text channel's " -#~ "previous messages." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user's @everyone or @here will " -#~ "mention everyone in the text channel." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can use emojis from other " -#~ "guilds." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can connect to a voice " -#~ "channel." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can speak in a voice " -#~ "channel." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Returns ``True`` if a user can mute other users." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Returns ``True`` if a user can deafen other users." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can move users between other" -#~ " voice channels." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can use voice activation in " -#~ "voice channels." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can change their nickname in" -#~ " the guild." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can change other user's " -#~ "nickname in the guild." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can create or edit roles " -#~ "less than their role's position." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can create, edit, or delete " -#~ "webhooks." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns ``True`` if a" -#~ " user can create, edit, or delete " -#~ "emojis." -#~ msgstr "" - -#~ msgid "Supported operations:" -#~ msgstr "サポートされている操作:" - -#~ msgid "Operation" -#~ msgstr "" - -#~ msgid "x == y" -#~ msgstr "" - -#~ msgid "x != y" -#~ msgstr "" - -#~ msgid "iter(x)" -#~ msgstr "" - -#~ msgid "" -#~ "Returns an iterator of (perm, value) " -#~ "pairs. This allows this class to " -#~ "be used as an iterable in e.g. " -#~ "set/list/dict constructions." -#~ msgstr "" - -#~ msgid "Returns the (allow, deny) pair from this overwrite." -#~ msgstr "" - -#~ msgid "The value of these pairs is :class:`Permissions`." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- 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." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns True if the " -#~ "system channel is used for member " -#~ "join notifications." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Returns True if the " -#~ "system channel is used for Nitro " -#~ "boosting notifications." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`aiohttp.ClientResponse` -- 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`." -#~ msgstr "" - -#~ msgid ":class:`str` -- The text of the error. Could be an empty string." -#~ msgstr "" - -#~ msgid ":class:`int` -- The status code of the HTTP request." -#~ msgstr "" - -#~ msgid ":class:`int` -- The Discord specific error code for the failure." -#~ msgstr "" - -#~ msgid ":class:`int` -- The close code of the websocket." -#~ msgstr "" - -#~ msgid ":class:`str` -- The reason provided for the closure." -#~ msgstr "" - -#~ msgid "Optional[:class:`int`] -- The shard ID that got closed if applicable." -#~ msgstr "" - -#~ msgid ":class:`int` -- The error code returned." -#~ msgstr "" - diff --git a/docs/locale/ja/LC_MESSAGES/discord.po b/docs/locale/ja/LC_MESSAGES/discord.po deleted file mode 100644 index 7963ed91..00000000 --- a/docs/locale/ja/LC_MESSAGES/discord.po +++ /dev/null @@ -1,179 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../discord.rst:4 -msgid "Creating a Bot Account" -msgstr "Botアカウント作成" - -#: ../../discord.rst:6 -msgid "" -"In order to work with the library and the Discord API in general, we must" -" first create a Discord Bot account." -msgstr "ライブラリとDiscord APIを使用するには、BotのDiscordアカウントを用意する必要があります。" - -#: ../../discord.rst:8 -msgid "Creating a Bot account is a pretty straightforward process." -msgstr "Botのアカウント作成はとても簡単です。" - -#: ../../discord.rst:10 ../../discord.rst:64 -#, fuzzy -msgid "" -"Make sure you're logged on to the `Discord website " -"`_." -msgstr "まずは `Discordのウェブサイト `_ にログインしてください。" - -#: ../../discord.rst:11 ../../discord.rst:65 -#, fuzzy -msgid "" -"Navigate to the `application page " -"`_" -msgstr "`アプリケーションページ `_ に移動します。" - -#: ../../discord.rst:12 -msgid "Click on the \"New Application\" button." -msgstr "「New Application」ボタンをクリックします。" - -#: ../../discord.rst:17 -msgid "Give the application a name and click \"Create\"." -msgstr "アプリケーションの名前を決めて、「Create」をクリックします。" - -#: ../../discord.rst:22 -msgid "" -"Create a Bot User by navigating to the \"Bot\" tab and clicking \"Add " -"Bot\"." -msgstr "「Bot」タブへ移動し、「Add Bot」をクリックしてBotユーザーを作成します。" - -#: ../../discord.rst:24 -msgid "Click \"Yes, do it!\" to continue." -msgstr "「Yes, do it!」をクリックして続行します。" - -#: ../../discord.rst:28 -msgid "" -"Make sure that **Public Bot** is ticked if you want others to invite your" -" bot." -msgstr "他人にBotの招待を許可する場合には、 **Public Bot** にチェックを入れてください。" - -#: ../../discord.rst:30 -msgid "" -"You should also make sure that **Require OAuth2 Code Grant** is unchecked" -" unless you are developing a service that needs it. If you're unsure, " -"then **leave it unchecked**." -msgstr "" -"また、必要なサービスを開発している場合を除いて、 **Require OAuth2 Code Grant** " -"がオフになっていることを確認する必要があります。わからない場合は **チェックを外してください** 。" - -#: ../../discord.rst:36 -msgid "Copy the token using the \"Copy\" button." -msgstr "「Copy」ボタンを使ってトークンをコピーします。" - -#: ../../discord.rst:38 -msgid "**This is not the Client Secret at the General Information page**" -msgstr "**General InformationページのClient Secretではないので注意してください**" - -#: ../../discord.rst:42 -msgid "" -"It should be worth noting that this token is essentially your bot's " -"password. You should **never** share this to someone else. In doing so, " -"someone can log in to your bot and do malicious things, such as leaving " -"servers, ban all members inside a server, or pinging everyone " -"maliciously." -msgstr "このトークンは、あなたのBotのパスワードと同義であることを覚えておきましょう。誰か他の人とトークンを共有することは絶対に避けてください。トークンがあれば、誰かがあなたのBotにログインし、サーバーから退出したり、サーバー内のすべてのメンバーをBANしたり、すべての人にメンションを送るなどといった悪質な行為を行える様になってしまいます。" - -#: ../../discord.rst:47 -msgid "The possibilities are endless, so **do not share this token.**" -msgstr "可能性は無限にあるので、絶対に **トークンを共有しないでください** 。" - -#: ../../discord.rst:49 -msgid "" -"If you accidentally leaked your token, click the \"Regenerate\" button as" -" soon as possible. This revokes your old token and re-generates a new " -"one. Now you need to use the new token to login." -msgstr "誤ってトークンを流出させてしまった場合、可能な限り速急に「Regenerate」ボタンをクリックしましょう。これによって古いトークンが無効になり、新しいトークンが再生成されます。今度からは新しいトークンを利用してログインを行う必要があります。" - -#: ../../discord.rst:53 -msgid "" -"And that's it. You now have a bot account and you can login with that " -"token." -msgstr "以上です。 これでボットアカウントが作成され、そのトークンでログインできます。" - -#: ../../discord.rst:58 -msgid "Inviting Your Bot" -msgstr "Botを招待する" - -#: ../../discord.rst:60 -msgid "So you've made a Bot User but it's not actually in any server." -msgstr "Botのユーザーを作成しましたが、現時点ではどのサーバーにも参加していない状態です。" - -#: ../../discord.rst:62 -msgid "If you want to invite your bot you must create an invite URL for it." -msgstr "Botを招待したい場合は、そのための招待URLを作成する必要があります。" - -#: ../../discord.rst:66 -msgid "Click on your bot's page." -msgstr "Botのページを開きます。" - -#: ../../discord.rst:67 -msgid "Go to the \"OAuth2\" tab." -msgstr "「OAuth2」タブへ移動します。" - -#: ../../discord.rst:72 -msgid "Tick the \"bot\" checkbox under \"scopes\"." -msgstr "「scopes」下にある「bot」チェックボックスを選択してください。" - -#: ../../discord.rst:77 -msgid "" -"Tick the permissions required for your bot to function under \"Bot " -"Permissions\"." -msgstr "「Bot Permissions」からBotの機能に必要な権限を選択してください。" - -#: ../../discord.rst:79 -msgid "" -"Please be aware of the consequences of requiring your bot to have the " -"\"Administrator\" permission." -msgstr "Botに「管理者」権限を要求させることによる影響は認識しておきましょう。" - -#: ../../discord.rst:81 -#, fuzzy -msgid "" -"Bot owners must have 2FA enabled for certain actions and permissions when" -" added in servers that have Server-Wide 2FA enabled. Check the `2FA " -"support page `_ for more information." -msgstr "" -"二段階認証が有効になっているサーバーにBotが追加された場合、Botの所有者は特定の動作と権限のために二段階認証を有効化させなければいけません。詳細は" -" `二段階認証のサポートページ `_ を参照してください。" - -#: ../../discord.rst:86 -msgid "" -"Now the resulting URL can be used to add your bot to a server. Copy and " -"paste the URL into your browser, choose a server to invite the bot to, " -"and click \"Authorize\"." -msgstr "結果的に生成されたURLを使ってBotをサーバーに追加することができます。URLをコピーしてブラウザに貼り付け、Botを招待したいサーバーを選択した後、「認証」をクリックしてください。" - -#: ../../discord.rst:91 -msgid "The person adding the bot needs \"Manage Server\" permissions to do so." -msgstr "Botを追加する人には「サーバー管理」権限が必要です。" - -#: ../../discord.rst:93 -msgid "" -"If you want to generate this URL dynamically at run-time inside your bot " -"and using the :class:`discord.Permissions` interface, you can use " -":func:`discord.utils.oauth_url`." -msgstr "" -"このURLを実行時に動的に生成したい場合は、 :class:`discord.Permissions` インターフェイスから " -":func:`discord.utils.oauth_url` を使用できます。" - diff --git a/docs/locale/ja/LC_MESSAGES/ext/commands/api.po b/docs/locale/ja/LC_MESSAGES/ext/commands/api.po deleted file mode 100644 index 0bf199bf..00000000 --- a/docs/locale/ja/LC_MESSAGES/ext/commands/api.po +++ /dev/null @@ -1,6780 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../ext/commands/api.rst:4 -msgid "API Reference" -msgstr "APIリファレンス" - -#: ../../ext/commands/api.rst:6 -msgid "" -"The following section outlines the API of discord.py's command extension " -"module." -msgstr "この項目ではdiscord.pyのAPIが持つコマンド拡張モジュールについて解説します。" - -#: ../../ext/commands/api.rst:11 -msgid "Bot" -msgstr "Bot" - -#: discord.ext.commands.Bot:1 of -msgid "Represents a discord bot." -msgstr "Discord Botを表します。" - -#: discord.ext.commands.Bot:3 of -msgid "" -"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." -msgstr "" -"このクラスは :class:`discord.Client` のサブクラスのため、 :class:`discord.Client` " -"でできることと同じことをこのBotで行うことができます。" - -#: discord.ext.commands.Bot:7 of -msgid "" -"This class also subclasses :class:`.GroupMixin` to provide the " -"functionality to manage commands." -msgstr "また、 :class:`.GroupMixin` も継承しており、コマンド管理の機能も使用可能です。" - -#: discord.ext.commands.Bot:12 of -msgid "" -"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." -msgstr "" -"コマンドの接頭詞とは、コマンドの判定のためにメッセージの先頭に付けなければならないものです。接頭詞には、そのまま接頭詞として使用する文字列、または" -" :class:`discord.Message` " -"を二つ目の引数として受け取り、接頭詞を返す呼び出し可能な関数を渡すことができます。これは「動的な」接頭詞の実装を容易にするためです。" - -#: discord.ext.commands.Bot:20 of -msgid "" -"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." -msgstr "接頭詞に空文字列を渡せば、接頭詞なしでコマンドの呼び出しができます。これはDM上では有用ですが、サーバーでは意図せずコマンドを呼び出してしまうことに繋がるため、避けるべきです。" - -#: discord.ext.commands.Bot:25 of -msgid "" -"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`. To avoid confusion empty iterables are not " -"allowed." -msgstr "" -"接頭詞は複数設定することもできます。複数の接頭詞がイテラブルで渡された場合、メッセージと最初に一致するものが接頭詞として使用されます。この接頭詞は" -" :attr:`.Context.prefix` で取得することができます。また、空のイテラブルオブジェクトは使用できません。" - -#: discord.ext.commands.Bot:33 of -msgid "" -"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." -msgstr "" -"複数の接頭辞を渡すとき、後の接頭辞にマッチする接頭辞を、それよりも前に渡さないよう注意してください。たとえば、接頭辞が``('!', " -"'!?')``のとき、``!?``の接頭辞は、その前のものが``!?``で始まるメッセージにマッチするため、どのメッセージにも反応しません。これは空文字列を渡すときは特に重要で、その後の接頭辞は無視されるため、空文字列は最後に置かないといけません。" - -#: discord.ext.commands.Bot:43 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.BadBoolArgument discord.ext.commands.BadUnionArgument -#: discord.ext.commands.Bot discord.ext.commands.Bot.activity -#: discord.ext.commands.Bot.allowed_mentions -#: discord.ext.commands.Bot.cached_messages discord.ext.commands.Bot.cogs -#: discord.ext.commands.Bot.commands discord.ext.commands.Bot.emojis -#: discord.ext.commands.Bot.extensions discord.ext.commands.Bot.guilds -#: discord.ext.commands.Bot.intents discord.ext.commands.Bot.latency -#: discord.ext.commands.Bot.private_channels discord.ext.commands.Bot.user -#: discord.ext.commands.Bot.users discord.ext.commands.Bot.voice_clients -#: discord.ext.commands.BotMissingAnyRole -#: discord.ext.commands.BotMissingPermissions -#: discord.ext.commands.BotMissingRole discord.ext.commands.ChannelNotFound -#: discord.ext.commands.ChannelNotReadable discord.ext.commands.CheckAnyFailure -#: discord.ext.commands.Cog.description discord.ext.commands.Cog.qualified_name -#: discord.ext.commands.CogMeta discord.ext.commands.Command -#: discord.ext.commands.Command.cog_name -#: discord.ext.commands.Command.full_parent_name -#: discord.ext.commands.Command.parents -#: discord.ext.commands.Command.qualified_name -#: discord.ext.commands.Command.root_parent -#: discord.ext.commands.Command.short_doc -#: discord.ext.commands.Command.signature -#: discord.ext.commands.CommandInvokeError -#: discord.ext.commands.CommandOnCooldown -#: discord.ext.commands.CommandRegistrationError discord.ext.commands.Context -#: discord.ext.commands.Context.cog discord.ext.commands.Context.guild -#: discord.ext.commands.Context.valid discord.ext.commands.Context.voice_client -#: discord.ext.commands.ConversionError discord.ext.commands.DefaultHelpCommand -#: discord.ext.commands.EmojiNotFound -#: discord.ext.commands.ExpectedClosingQuoteError -#: discord.ext.commands.ExtensionError discord.ext.commands.ExtensionFailed -#: discord.ext.commands.ExtensionNotFound discord.ext.commands.Group -#: discord.ext.commands.Group.cog_name discord.ext.commands.Group.commands -#: discord.ext.commands.Group.full_parent_name -#: discord.ext.commands.Group.parents discord.ext.commands.Group.qualified_name -#: discord.ext.commands.Group.root_parent discord.ext.commands.Group.short_doc -#: discord.ext.commands.Group.signature discord.ext.commands.GroupMixin -#: discord.ext.commands.GroupMixin.commands discord.ext.commands.HelpCommand -#: discord.ext.commands.HelpCommand.clean_prefix -#: discord.ext.commands.InvalidEndOfQuotedStringError -#: discord.ext.commands.MaxConcurrencyReached -#: discord.ext.commands.MemberNotFound discord.ext.commands.MessageNotFound -#: discord.ext.commands.MinimalHelpCommand discord.ext.commands.MissingAnyRole -#: discord.ext.commands.MissingPermissions -#: discord.ext.commands.MissingRequiredArgument -#: discord.ext.commands.MissingRole discord.ext.commands.Paginator -#: discord.ext.commands.Paginator.pages -#: discord.ext.commands.PartialEmojiConversionFailure -#: discord.ext.commands.RoleNotFound discord.ext.commands.UnexpectedQuoteError -#: discord.ext.commands.UserNotFound discord.ext.commands.clean_content of -msgid "type" -msgstr "" - -#: discord.ext.commands.Bot:47 discord.ext.commands.Bot:61 -#: discord.ext.commands.Bot.is_owner:17 discord.ext.commands.Command:49 -#: discord.ext.commands.Command:86 discord.ext.commands.Command:97 -#: discord.ext.commands.Command:112 discord.ext.commands.Command:121 -#: discord.ext.commands.Command:129 discord.ext.commands.Command.can_run:16 -#: discord.ext.commands.Command.is_on_cooldown:7 -#: discord.ext.commands.CommandRegistrationError:18 -#: discord.ext.commands.Context:77 discord.ext.commands.Context.valid:3 -#: discord.ext.commands.DefaultHelpCommand:18 discord.ext.commands.Group:18 -#: discord.ext.commands.Group:25 discord.ext.commands.Group.can_run:16 -#: discord.ext.commands.Group.is_on_cooldown:7 -#: discord.ext.commands.GroupMixin:15 discord.ext.commands.HelpCommand:24 -#: discord.ext.commands.HelpCommand:31 -#: discord.ext.commands.MinimalHelpCommand:9 -#: discord.ext.commands.clean_content:10 discord.ext.commands.clean_content:16 -#: discord.ext.commands.clean_content:22 of -msgid ":class:`bool`" -msgstr "" - -#: discord.ext.commands.Bot:51 of -#, fuzzy -msgid "The content prefixed into the default help message." -msgstr ":class:`str` -- この属性に入力されたテキストは、デフォルトのヘルプメッセージの先頭に表示されます。" - -#: discord.ext.commands.BadBoolArgument:11 discord.ext.commands.Bot:53 -#: discord.ext.commands.ChannelNotFound:11 -#: discord.ext.commands.Cog.description:3 -#: discord.ext.commands.Cog.qualified_name:3 discord.ext.commands.CogMeta:37 -#: discord.ext.commands.Command:10 discord.ext.commands.Command:22 -#: discord.ext.commands.Command:34 discord.ext.commands.Command:79 -#: discord.ext.commands.Command.full_parent_name:6 -#: discord.ext.commands.Command.qualified_name:7 -#: discord.ext.commands.Command.short_doc:7 -#: discord.ext.commands.Command.signature:3 -#: discord.ext.commands.CommandRegistrationError:12 -#: discord.ext.commands.Context:41 discord.ext.commands.Context:54 -#: discord.ext.commands.DefaultHelpCommand:49 -#: discord.ext.commands.DefaultHelpCommand:56 -#: discord.ext.commands.EmojiNotFound:11 -#: discord.ext.commands.ExpectedClosingQuoteError:9 -#: discord.ext.commands.ExtensionError:9 discord.ext.commands.ExtensionFailed:9 -#: discord.ext.commands.ExtensionNotFound:12 -#: discord.ext.commands.Group.full_parent_name:6 -#: discord.ext.commands.Group.qualified_name:7 -#: discord.ext.commands.Group.short_doc:7 -#: discord.ext.commands.Group.signature:3 -#: discord.ext.commands.HelpCommand.clean_prefix:3 -#: discord.ext.commands.HelpCommand.command_not_found:13 -#: discord.ext.commands.HelpCommand.get_command_signature:7 -#: discord.ext.commands.HelpCommand.invoked_with:10 -#: discord.ext.commands.HelpCommand.remove_mentions:6 -#: discord.ext.commands.HelpCommand.subcommand_not_found:20 -#: discord.ext.commands.InvalidEndOfQuotedStringError:10 -#: discord.ext.commands.MemberNotFound:12 -#: discord.ext.commands.MessageNotFound:11 -#: discord.ext.commands.MinimalHelpCommand:16 -#: discord.ext.commands.MinimalHelpCommand:23 -#: discord.ext.commands.MinimalHelpCommand:48 -#: discord.ext.commands.MinimalHelpCommand.get_command_signature:7 -#: discord.ext.commands.MinimalHelpCommand.get_ending_note:6 -#: discord.ext.commands.MinimalHelpCommand.get_opening_note:9 -#: discord.ext.commands.Paginator:13 discord.ext.commands.Paginator:19 -#: discord.ext.commands.PartialEmojiConversionFailure:12 -#: discord.ext.commands.RoleNotFound:11 -#: discord.ext.commands.UnexpectedQuoteError:9 -#: discord.ext.commands.UserNotFound:12 of -msgid ":class:`str`" -msgstr "" - -#: discord.ext.commands.Bot:57 of -#, fuzzy -msgid "" -"If ``True``, the bot will only listen to commands invoked by itself " -"rather than ignoring itself. If ``False`` (the default) then the bot will" -" ignore itself. This cannot be changed once initialised." -msgstr "" -":class:`bool` -- ``True`` の場合、Botは自分自身を無視せず、自分自身を呼び出したコマンドのみをトリガーとします。 " -"``False`` (デフォルト)なら自分自身を無視します。初期化後には変更できません。" - -#: discord.ext.commands.Bot:65 of -#, fuzzy -msgid "" -"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`." -msgstr "" -"Optional[:class:`.HelpCommand`] -- " -"ヘルプコマンドの実装。これは、実行時に動的に設定できます。ヘルプコマンドを削除するには、``None`` " -"を入力してください。ヘルプコマンドの実装の詳細については、 :ref:'ext_commands_help_command' を参照してください。" - -#: discord.ext.commands.Bot:69 of -msgid "Optional[:class:`.HelpCommand`]" -msgstr "" - -#: discord.ext.commands.Bot:73 of -#, fuzzy -msgid "" -"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`." -msgstr "" -"Optional[:class:`int`] -- Botを管理するユーザーのID。 設定されていない場合、 :meth:`.is_owner` " -"を介して参照されたとき、 :meth:`~.Bot.application_info` を用いて自動的に取得されます。" - -#: discord.ext.commands.Bot:77 discord.ext.commands.DefaultHelpCommand:36 -#: discord.ext.commands.MinimalHelpCommand:41 of -msgid "Optional[:class:`int`]" -msgstr "" - -#: discord.ext.commands.Bot:81 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Bot:89 of -msgid "Optional[Collection[:class:`int`]]" -msgstr "" - -#: discord.ext.commands.Bot.activity:1 of -msgid "The activity being used upon logging in." -msgstr "" - -#: discord.ext.commands.Bot.activity:4 of -msgid "Optional[:class:`.BaseActivity`]" -msgstr "" - -#: discord.ext.commands.Bot.add_check:1 of -msgid "Adds a global check to the bot." -msgstr "ボットにグローバルチェックを追加します。" - -#: discord.ext.commands.Bot.add_check:3 of -msgid "" -"This is the non-decorator interface to :meth:`.check` and " -":meth:`.check_once`." -msgstr "これは:meth:`.check`と:meth:`.check_once`のデコレータでない実装です。" - -#: ../../ext/commands/api.rst discord.ext.commands.Bot.add_check -#: discord.ext.commands.Bot.add_cog discord.ext.commands.Bot.add_command -#: discord.ext.commands.Bot.add_listener discord.ext.commands.Bot.after_invoke -#: discord.ext.commands.Bot.before_identify_hook -#: discord.ext.commands.Bot.before_invoke -#: discord.ext.commands.Bot.change_presence discord.ext.commands.Bot.connect -#: discord.ext.commands.Bot.create_guild discord.ext.commands.Bot.delete_invite -#: discord.ext.commands.Bot.fetch_guild discord.ext.commands.Bot.fetch_guilds -#: discord.ext.commands.Bot.fetch_invite -#: discord.ext.commands.Bot.fetch_template discord.ext.commands.Bot.fetch_user -#: discord.ext.commands.Bot.fetch_user_profile -#: discord.ext.commands.Bot.fetch_widget discord.ext.commands.Bot.get_channel -#: discord.ext.commands.Bot.get_cog discord.ext.commands.Bot.get_command -#: discord.ext.commands.Bot.get_context discord.ext.commands.Bot.get_emoji -#: discord.ext.commands.Bot.get_guild discord.ext.commands.Bot.get_prefix -#: discord.ext.commands.Bot.get_user discord.ext.commands.Bot.invoke -#: discord.ext.commands.Bot.is_owner discord.ext.commands.Bot.load_extension -#: discord.ext.commands.Bot.login discord.ext.commands.Bot.process_commands -#: discord.ext.commands.Bot.reload_extension -#: discord.ext.commands.Bot.remove_check discord.ext.commands.Bot.remove_cog -#: discord.ext.commands.Bot.remove_command -#: discord.ext.commands.Bot.remove_listener -#: discord.ext.commands.Bot.request_offline_members -#: discord.ext.commands.Bot.unload_extension discord.ext.commands.Bot.wait_for -#: discord.ext.commands.CategoryChannelConverter.convert -#: discord.ext.commands.Cog.cog_after_invoke -#: discord.ext.commands.Cog.cog_before_invoke -#: discord.ext.commands.Cog.cog_command_error discord.ext.commands.Cog.listener -#: discord.ext.commands.ColourConverter.convert -#: discord.ext.commands.Command.add_check -#: discord.ext.commands.Command.after_invoke -#: discord.ext.commands.Command.before_invoke -#: discord.ext.commands.Command.can_run discord.ext.commands.Command.error -#: discord.ext.commands.Command.get_cooldown_retry_after -#: discord.ext.commands.Command.is_on_cooldown -#: discord.ext.commands.Command.remove_check -#: discord.ext.commands.Command.reset_cooldown -#: discord.ext.commands.Context.fetch_message -#: discord.ext.commands.Context.history discord.ext.commands.Context.invoke -#: discord.ext.commands.Context.reinvoke discord.ext.commands.Context.send -#: discord.ext.commands.Context.send_help -#: discord.ext.commands.Converter.convert -#: discord.ext.commands.DefaultHelpCommand.add_command_formatting -#: discord.ext.commands.DefaultHelpCommand.add_indented_commands -#: discord.ext.commands.EmojiConverter.convert -#: discord.ext.commands.GameConverter.convert -#: discord.ext.commands.Group.add_check discord.ext.commands.Group.add_command -#: discord.ext.commands.Group.after_invoke -#: discord.ext.commands.Group.before_invoke discord.ext.commands.Group.can_run -#: discord.ext.commands.Group.error discord.ext.commands.Group.get_command -#: discord.ext.commands.Group.get_cooldown_retry_after -#: discord.ext.commands.Group.is_on_cooldown -#: discord.ext.commands.Group.remove_check -#: discord.ext.commands.Group.remove_command -#: discord.ext.commands.Group.reset_cooldown -#: discord.ext.commands.GroupMixin.add_command -#: discord.ext.commands.GroupMixin.get_command -#: discord.ext.commands.GroupMixin.remove_command -#: discord.ext.commands.HelpCommand.add_check -#: discord.ext.commands.HelpCommand.command_not_found -#: discord.ext.commands.HelpCommand.filter_commands -#: discord.ext.commands.HelpCommand.get_command_signature -#: discord.ext.commands.HelpCommand.get_max_size -#: discord.ext.commands.HelpCommand.on_help_command_error -#: discord.ext.commands.HelpCommand.prepare_help_command -#: discord.ext.commands.HelpCommand.remove_check -#: discord.ext.commands.HelpCommand.send_bot_help -#: discord.ext.commands.HelpCommand.send_cog_help -#: discord.ext.commands.HelpCommand.send_command_help -#: discord.ext.commands.HelpCommand.send_error_message -#: discord.ext.commands.HelpCommand.send_group_help -#: discord.ext.commands.HelpCommand.subcommand_not_found -#: discord.ext.commands.InviteConverter.convert -#: discord.ext.commands.MemberConverter.convert -#: discord.ext.commands.MessageConverter.convert -#: discord.ext.commands.MinimalHelpCommand.add_aliases_formatting -#: discord.ext.commands.MinimalHelpCommand.add_bot_commands_formatting -#: discord.ext.commands.MinimalHelpCommand.add_command_formatting -#: discord.ext.commands.MinimalHelpCommand.add_subcommand_formatting -#: discord.ext.commands.MinimalHelpCommand.get_command_signature -#: discord.ext.commands.NSFWChannelRequired -#: discord.ext.commands.Paginator.add_line -#: discord.ext.commands.PartialEmojiConverter.convert -#: discord.ext.commands.RoleConverter.convert -#: discord.ext.commands.TextChannelConverter.convert -#: discord.ext.commands.UserConverter.convert -#: discord.ext.commands.VoiceChannelConverter.convert -#: discord.ext.commands.check discord.ext.commands.check_any -#: discord.ext.commands.clean_content.convert discord.ext.commands.command -#: discord.ext.commands.cooldown discord.ext.commands.has_any_role -#: discord.ext.commands.has_permissions discord.ext.commands.has_role -#: discord.ext.commands.max_concurrency of -msgid "Parameters" -msgstr "パラメータ" - -#: discord.ext.commands.Bot.add_check:6 of -msgid "The function that was used as a global check." -msgstr "グローバルチェックとして使用される関数。" - -#: discord.ext.commands.Bot.add_check:7 of -#, fuzzy -msgid "" -"If the function should only be called once per :meth:`.Command.invoke` " -"call." -msgstr "その関数が :meth:`Command.invoke` の呼び出し時に、一度だけ呼び出されるべきかどうか。" - -#: discord.ext.commands.Bot.add_cog:1 of -msgid "Adds a \"cog\" to the bot." -msgstr "botに「コグ」を追加します。" - -#: discord.ext.commands.Bot.add_cog:3 of -msgid "A cog is a class that has its own event listeners and commands." -msgstr "コグは、イベントリスナーとコマンドを持つクラスです。" - -#: discord.ext.commands.Bot.add_cog:5 of -msgid "The cog to register to the bot." -msgstr "ボットに登録するコグ。" - -#: discord.ext.commands.Bot.add_cog discord.ext.commands.Bot.add_command -#: discord.ext.commands.Bot.after_invoke -#: discord.ext.commands.Bot.application_info -#: discord.ext.commands.Bot.before_invoke -#: discord.ext.commands.Bot.change_presence discord.ext.commands.Bot.connect -#: discord.ext.commands.Bot.create_guild discord.ext.commands.Bot.delete_invite -#: discord.ext.commands.Bot.event discord.ext.commands.Bot.fetch_channel -#: discord.ext.commands.Bot.fetch_guild discord.ext.commands.Bot.fetch_guilds -#: discord.ext.commands.Bot.fetch_invite -#: discord.ext.commands.Bot.fetch_template discord.ext.commands.Bot.fetch_user -#: discord.ext.commands.Bot.fetch_user_profile -#: discord.ext.commands.Bot.fetch_webhook discord.ext.commands.Bot.fetch_widget -#: discord.ext.commands.Bot.listen discord.ext.commands.Bot.load_extension -#: discord.ext.commands.Bot.login discord.ext.commands.Bot.reload_extension -#: discord.ext.commands.Bot.request_offline_members -#: discord.ext.commands.Bot.start discord.ext.commands.Bot.unload_extension -#: discord.ext.commands.Bot.wait_for -#: discord.ext.commands.CategoryChannelConverter.convert -#: discord.ext.commands.Cog.listener -#: discord.ext.commands.ColourConverter.convert -#: discord.ext.commands.Command.after_invoke -#: discord.ext.commands.Command.before_invoke -#: discord.ext.commands.Command.can_run discord.ext.commands.Command.error -#: discord.ext.commands.Context.fetch_message -#: discord.ext.commands.Context.history discord.ext.commands.Context.invoke -#: discord.ext.commands.Context.pins discord.ext.commands.Context.reinvoke -#: discord.ext.commands.Context.send discord.ext.commands.Converter.convert -#: discord.ext.commands.EmojiConverter.convert -#: discord.ext.commands.GameConverter.convert -#: discord.ext.commands.Group.add_command -#: discord.ext.commands.Group.after_invoke -#: discord.ext.commands.Group.before_invoke discord.ext.commands.Group.can_run -#: discord.ext.commands.Group.error discord.ext.commands.GroupMixin.add_command -#: discord.ext.commands.InviteConverter.convert -#: discord.ext.commands.MemberConverter.convert -#: discord.ext.commands.MessageConverter.convert -#: discord.ext.commands.Paginator.add_line -#: discord.ext.commands.PartialEmojiConverter.convert -#: discord.ext.commands.RoleConverter.convert -#: discord.ext.commands.TextChannelConverter.convert -#: discord.ext.commands.UserConverter.convert -#: discord.ext.commands.VoiceChannelConverter.convert -#: discord.ext.commands.check_any discord.ext.commands.clean_content.convert -#: discord.ext.commands.command of -#, fuzzy -msgid "Raises" -msgstr "例外" - -#: discord.ext.commands.Bot.add_cog:8 of -#, fuzzy -msgid "The cog does not inherit from :class:`.Cog`." -msgstr ":exc:`TypeError -- コグが :class:`.Cog` を継承していない。" - -#: discord.ext.commands.Bot.add_cog:9 of -#, fuzzy -msgid "An error happened during loading." -msgstr ":exc:`CommandError` -- 読み込み中にエラーが発生した。" - -#: discord.ext.commands.Bot.add_command:1 -#: discord.ext.commands.Group.add_command:1 -#: discord.ext.commands.GroupMixin.add_command:1 of -#, fuzzy -msgid "Adds a :class:`.Command` into the internal list of commands." -msgstr ":class:`.Command`やそのサブクラスを内部のコマンドリストに追加します。" - -#: discord.ext.commands.Bot.add_command:3 -#: discord.ext.commands.Group.add_command:3 -#: discord.ext.commands.GroupMixin.add_command:3 of -msgid "" -"This is usually not called, instead the :meth:`~.GroupMixin.command` or " -":meth:`~.GroupMixin.group` shortcut decorators are used instead." -msgstr "" -"これは通常、呼び出されません。代わりに :meth:`~.GroupMixin.command` か " -":meth:`~.GroupMixin.group` のショートカットデコレータが使われます。" - -#: discord.ext.commands.Bot.add_command:6 -#: discord.ext.commands.Group.add_command:6 -#: discord.ext.commands.GroupMixin.add_command:6 of -msgid "" -"Raise :exc:`.CommandRegistrationError` instead of generic " -":exc:`.ClientException`" -msgstr "" - -#: discord.ext.commands.Bot.add_command:9 -#: discord.ext.commands.Group.add_command:9 -#: discord.ext.commands.GroupMixin.add_command:9 of -msgid "The command to add." -msgstr "追加するコマンド。" - -#: discord.ext.commands.Bot.add_command:12 -#: discord.ext.commands.Group.add_command:12 -#: discord.ext.commands.GroupMixin.add_command:12 of -msgid "If the command or its alias is already registered by different command." -msgstr "" - -#: discord.ext.commands.Bot.add_command:13 -#: discord.ext.commands.Group.add_command:13 -#: discord.ext.commands.GroupMixin.add_command:13 of -#, fuzzy -msgid "If the command passed is not a subclass of :class:`.Command`." -msgstr ":exc:`TypeError` -- 渡されたコマンドが:class:`.Command`のサブコマンドではないという例外" - -#: discord.ext.commands.Bot.add_listener:1 of -msgid "The non decorator alternative to :meth:`.listen`." -msgstr ":meth:`.listen` の代替の非デコレータ" - -#: discord.ext.commands.Bot.add_listener:3 of -msgid "The function to call." -msgstr "呼び出される関数" - -#: discord.ext.commands.Bot.add_listener:5 of -msgid "The name of the event to listen for. Defaults to ``func.__name__``." -msgstr "待機するイベントの名前。デフォルトでは ``func.__name__`` です。" - -#: discord.ext.commands.Bot.add_listener:9 -#: discord.ext.commands.Bot.change_presence:6 discord.ext.commands.Bot.check:16 -#: discord.ext.commands.Bot.check_once:26 discord.ext.commands.Bot.event:8 -#: discord.ext.commands.Bot.listen:8 discord.ext.commands.before_invoke:9 -#: discord.ext.commands.has_any_role:20 discord.ext.commands.has_permissions:16 -#: discord.ext.commands.when_mentioned_or:6 of -msgid "Example" -msgstr "例" - -#: discord.ext.commands.Bot.after_invoke:1 -#: discord.ext.commands.Command.after_invoke:1 -#: discord.ext.commands.Group.after_invoke:1 -#: discord.ext.commands.after_invoke:1 of -msgid "A decorator that registers a coroutine as a post-invoke hook." -msgstr "" - -#: discord.ext.commands.Bot.after_invoke:3 -#: discord.ext.commands.Command.after_invoke:3 -#: discord.ext.commands.Group.after_invoke:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.after_invoke:7 -#: discord.ext.commands.Command.after_invoke:7 -#: discord.ext.commands.Group.after_invoke:7 of -msgid "This post-invoke hook takes a sole parameter, a :class:`.Context`." -msgstr "" - -#: discord.ext.commands.Bot.after_invoke:11 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.after_invoke:17 -#: discord.ext.commands.Command.after_invoke:11 -#: discord.ext.commands.Group.after_invoke:11 of -msgid "The coroutine to register as the post-invoke hook." -msgstr "" - -#: discord.ext.commands.Bot.after_invoke:20 -#: discord.ext.commands.Bot.before_invoke:19 discord.ext.commands.Bot.event:15 -#: discord.ext.commands.Command.after_invoke:14 -#: discord.ext.commands.Command.before_invoke:14 -#: discord.ext.commands.Command.error:10 -#: discord.ext.commands.Group.after_invoke:14 -#: discord.ext.commands.Group.before_invoke:14 -#: discord.ext.commands.Group.error:10 of -#, fuzzy -msgid "The coroutine passed is not actually a coroutine." -msgstr ":exc:`TypeError` -- 渡されたコルーチンが実際はコルーチンではない。" - -#: discord.ext.commands.Bot.allowed_mentions:1 of -msgid "The allowed mention configuration." -msgstr "" - -#: discord.ext.commands.Bot.allowed_mentions:5 of -msgid "Optional[:class:`~discord.AllowedMentions`]" -msgstr "" - -#: discord.ext.commands.Bot.application_info:1 -#: discord.ext.commands.Bot.before_identify_hook:1 -#: discord.ext.commands.Bot.change_presence:1 -#: discord.ext.commands.Bot.connect:1 discord.ext.commands.Bot.create_guild:1 -#: discord.ext.commands.Bot.delete_invite:1 -#: discord.ext.commands.Bot.fetch_channel:1 -#: discord.ext.commands.Bot.fetch_guild:1 -#: discord.ext.commands.Bot.fetch_guilds:1 -#: discord.ext.commands.Bot.fetch_invite:1 -#: discord.ext.commands.Bot.fetch_template:1 -#: discord.ext.commands.Bot.fetch_user:1 -#: discord.ext.commands.Bot.fetch_user_profile:1 -#: discord.ext.commands.Bot.fetch_webhook:1 -#: discord.ext.commands.Bot.fetch_widget:1 -#: discord.ext.commands.Bot.get_context:1 discord.ext.commands.Bot.get_prefix:1 -#: discord.ext.commands.Bot.invoke:1 discord.ext.commands.Bot.is_owner:1 -#: discord.ext.commands.Bot.login:1 discord.ext.commands.Bot.logout:1 -#: discord.ext.commands.Bot.on_command_error:1 -#: discord.ext.commands.Bot.on_error:1 -#: discord.ext.commands.Bot.process_commands:1 -#: discord.ext.commands.Bot.request_offline_members:1 -#: discord.ext.commands.Bot.start:1 discord.ext.commands.Bot.wait_for:1 -#: discord.ext.commands.Bot.wait_until_ready:1 -#: discord.ext.commands.CategoryChannelConverter.convert:1 -#: discord.ext.commands.ColourConverter.convert:1 -#: discord.ext.commands.Command.__call__:1 -#: discord.ext.commands.Command.can_run:1 -#: discord.ext.commands.Context.fetch_message:1 -#: discord.ext.commands.Context.invoke:1 discord.ext.commands.Context.pins:1 -#: discord.ext.commands.Context.reinvoke:1 discord.ext.commands.Context.send:1 -#: discord.ext.commands.Context.send_help:1 -#: discord.ext.commands.Context.trigger_typing:1 -#: discord.ext.commands.Converter.convert:1 -#: discord.ext.commands.EmojiConverter.convert:1 -#: discord.ext.commands.GameConverter.convert:1 -#: discord.ext.commands.Group.can_run:1 -#: discord.ext.commands.HelpCommand.command_callback:1 -#: discord.ext.commands.HelpCommand.filter_commands:1 -#: discord.ext.commands.HelpCommand.on_help_command_error:1 -#: discord.ext.commands.HelpCommand.prepare_help_command:1 -#: discord.ext.commands.HelpCommand.send_bot_help:1 -#: discord.ext.commands.HelpCommand.send_cog_help:1 -#: discord.ext.commands.HelpCommand.send_command_help:1 -#: discord.ext.commands.HelpCommand.send_error_message:1 -#: discord.ext.commands.HelpCommand.send_group_help:1 -#: discord.ext.commands.InviteConverter.convert:1 -#: discord.ext.commands.MemberConverter.convert:1 -#: discord.ext.commands.MessageConverter.convert:1 -#: discord.ext.commands.PartialEmojiConverter.convert:1 -#: discord.ext.commands.RoleConverter.convert:1 -#: discord.ext.commands.TextChannelConverter.convert:1 -#: discord.ext.commands.UserConverter.convert:1 -#: discord.ext.commands.VoiceChannelConverter.convert:1 -#: discord.ext.commands.clean_content.convert:1 of -msgid "|coro|" -msgstr "|coro|" - -#: discord.ext.commands.Bot.application_info:3 of -msgid "Retrieves the bot's application information." -msgstr "Botのアプリケーション情報を取得します。" - -#: discord.ext.commands.Bot.application_info:5 of -#, fuzzy -msgid "Retrieving the information failed somehow." -msgstr ":exc:`.HTTPException` -- 何らかの要因で情報の取得に失敗した。" - -#: discord.ext.commands.Bot.application_info discord.ext.commands.Bot.command -#: discord.ext.commands.Bot.create_guild discord.ext.commands.Bot.fetch_channel -#: discord.ext.commands.Bot.fetch_guild discord.ext.commands.Bot.fetch_invite -#: discord.ext.commands.Bot.fetch_template discord.ext.commands.Bot.fetch_user -#: discord.ext.commands.Bot.fetch_user_profile -#: discord.ext.commands.Bot.fetch_webhook discord.ext.commands.Bot.fetch_widget -#: discord.ext.commands.Bot.get_channel discord.ext.commands.Bot.get_cog -#: discord.ext.commands.Bot.get_command discord.ext.commands.Bot.get_context -#: discord.ext.commands.Bot.get_emoji discord.ext.commands.Bot.get_guild -#: discord.ext.commands.Bot.get_prefix discord.ext.commands.Bot.get_user -#: discord.ext.commands.Bot.group discord.ext.commands.Bot.is_owner -#: discord.ext.commands.Bot.remove_command discord.ext.commands.Bot.wait_for -#: discord.ext.commands.Cog.get_commands discord.ext.commands.Cog.get_listeners -#: discord.ext.commands.Command.can_run discord.ext.commands.Command.copy -#: discord.ext.commands.Command.get_cooldown_retry_after -#: discord.ext.commands.Command.is_on_cooldown -#: discord.ext.commands.Context.fetch_message discord.ext.commands.Context.pins -#: discord.ext.commands.Context.send discord.ext.commands.Context.send_help -#: discord.ext.commands.DefaultHelpCommand.get_destination -#: discord.ext.commands.Group.can_run discord.ext.commands.Group.command -#: discord.ext.commands.Group.copy discord.ext.commands.Group.get_command -#: discord.ext.commands.Group.get_cooldown_retry_after -#: discord.ext.commands.Group.group discord.ext.commands.Group.is_on_cooldown -#: discord.ext.commands.Group.remove_command -#: discord.ext.commands.GroupMixin.command -#: discord.ext.commands.GroupMixin.get_command -#: discord.ext.commands.GroupMixin.group -#: discord.ext.commands.GroupMixin.remove_command -#: discord.ext.commands.HelpCommand.cog -#: discord.ext.commands.HelpCommand.command_not_found -#: discord.ext.commands.HelpCommand.filter_commands -#: discord.ext.commands.HelpCommand.get_command_signature -#: discord.ext.commands.HelpCommand.get_destination -#: discord.ext.commands.HelpCommand.get_max_size -#: discord.ext.commands.HelpCommand.invoked_with -#: discord.ext.commands.HelpCommand.remove_mentions -#: discord.ext.commands.HelpCommand.subcommand_not_found -#: discord.ext.commands.MinimalHelpCommand.get_command_signature -#: discord.ext.commands.MinimalHelpCommand.get_destination -#: discord.ext.commands.MinimalHelpCommand.get_ending_note -#: discord.ext.commands.MinimalHelpCommand.get_opening_note of -msgid "Returns" -msgstr "戻り値" - -#: discord.ext.commands.Bot.application_info:7 of -msgid "The bot's application information." -msgstr "Botのアプリケーション情報。" - -#: discord.ext.commands.Bot.application_info discord.ext.commands.Bot.command -#: discord.ext.commands.Bot.create_guild discord.ext.commands.Bot.fetch_channel -#: discord.ext.commands.Bot.fetch_guild discord.ext.commands.Bot.fetch_invite -#: discord.ext.commands.Bot.fetch_template discord.ext.commands.Bot.fetch_user -#: discord.ext.commands.Bot.fetch_user_profile -#: discord.ext.commands.Bot.fetch_webhook discord.ext.commands.Bot.fetch_widget -#: discord.ext.commands.Bot.get_channel discord.ext.commands.Bot.get_cog -#: discord.ext.commands.Bot.get_command discord.ext.commands.Bot.get_context -#: discord.ext.commands.Bot.get_emoji discord.ext.commands.Bot.get_guild -#: discord.ext.commands.Bot.get_prefix discord.ext.commands.Bot.get_user -#: discord.ext.commands.Bot.group discord.ext.commands.Bot.is_owner -#: discord.ext.commands.Bot.remove_command discord.ext.commands.Bot.wait_for -#: discord.ext.commands.Cog.get_commands discord.ext.commands.Cog.get_listeners -#: discord.ext.commands.Command.can_run discord.ext.commands.Command.copy -#: discord.ext.commands.Command.get_cooldown_retry_after -#: discord.ext.commands.Command.is_on_cooldown -#: discord.ext.commands.Context.fetch_message discord.ext.commands.Context.pins -#: discord.ext.commands.Context.send discord.ext.commands.Context.send_help -#: discord.ext.commands.DefaultHelpCommand.get_destination -#: discord.ext.commands.Group.can_run discord.ext.commands.Group.command -#: discord.ext.commands.Group.copy discord.ext.commands.Group.get_command -#: discord.ext.commands.Group.get_cooldown_retry_after -#: discord.ext.commands.Group.group discord.ext.commands.Group.is_on_cooldown -#: discord.ext.commands.Group.remove_command -#: discord.ext.commands.GroupMixin.command -#: discord.ext.commands.GroupMixin.get_command -#: discord.ext.commands.GroupMixin.group -#: discord.ext.commands.GroupMixin.remove_command -#: discord.ext.commands.HelpCommand.cog -#: discord.ext.commands.HelpCommand.command_not_found -#: discord.ext.commands.HelpCommand.filter_commands -#: discord.ext.commands.HelpCommand.get_command_signature -#: discord.ext.commands.HelpCommand.get_destination -#: discord.ext.commands.HelpCommand.get_max_size -#: discord.ext.commands.HelpCommand.invoked_with -#: discord.ext.commands.HelpCommand.remove_mentions -#: discord.ext.commands.HelpCommand.subcommand_not_found -#: discord.ext.commands.MinimalHelpCommand.get_command_signature -#: discord.ext.commands.MinimalHelpCommand.get_destination -#: discord.ext.commands.MinimalHelpCommand.get_ending_note -#: discord.ext.commands.MinimalHelpCommand.get_opening_note of -msgid "Return type" -msgstr "戻り値の型" - -#: discord.ext.commands.Bot.application_info:8 of -msgid ":class:`.AppInfo`" -msgstr ":class:`.AppInfo`" - -#: discord.ext.commands.Bot.before_identify_hook:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.before_identify_hook:7 of -msgid "The default implementation sleeps for 5 seconds." -msgstr "" - -#: discord.ext.commands.Bot.before_identify_hook:11 of -msgid "The shard ID that requested being IDENTIFY'd" -msgstr "" - -#: discord.ext.commands.Bot.before_identify_hook:13 of -msgid "Whether this IDENTIFY is the first initial IDENTIFY." -msgstr "" - -#: discord.ext.commands.Bot.before_invoke:1 -#: discord.ext.commands.Command.before_invoke:1 -#: discord.ext.commands.Group.before_invoke:1 -#: discord.ext.commands.before_invoke:1 of -msgid "A decorator that registers a coroutine as a pre-invoke hook." -msgstr "" - -#: discord.ext.commands.Bot.before_invoke:3 -#: discord.ext.commands.Command.before_invoke:3 -#: discord.ext.commands.Group.before_invoke:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.before_invoke:7 -#: discord.ext.commands.Command.before_invoke:7 -#: discord.ext.commands.Group.before_invoke:7 of -msgid "This pre-invoke hook takes a sole parameter, a :class:`.Context`." -msgstr "" - -#: discord.ext.commands.Bot.before_invoke:11 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.before_invoke:16 -#: discord.ext.commands.Command.before_invoke:11 -#: discord.ext.commands.Group.before_invoke:11 of -msgid "The coroutine to register as the pre-invoke hook." -msgstr "" - -#: discord.ext.commands.Bot.cached_messages:1 of -#, fuzzy -msgid "Read-only list of messages the connected client has cached." -msgstr "Sequence[:class:`.Message`] -- 接続されたクライアントにキャッシュされたメッセージの、読み取り専用リスト。" - -#: discord.ext.commands.Bot.cached_messages:5 of -msgid "Sequence[:class:`.Message`]" -msgstr "" - -#: discord.ext.commands.Bot.change_presence:3 of -msgid "Changes the client's presence." -msgstr "クライアントのステータスを変更します。" - -#: discord.ext.commands.Bot.change_presence:12 of -msgid "The activity being done. ``None`` if no currently active activity is done." -msgstr "実行中のアクティビティ。何も実行していない場合は ``None`` を返します。" - -#: discord.ext.commands.Bot.change_presence:14 of -msgid "" -"Indicates what status to change to. If ``None``, then " -":attr:`.Status.online` is used." -msgstr "変更するステータスを示します。 ``None`` の場合、 :attr:`.Status.online` が使用されます。" - -#: discord.ext.commands.Bot.change_presence:17 of -msgid "" -"Indicates if you are going AFK. This allows the discord client to know " -"how to handle push notifications better for you in case you are actually " -"idle and not lying." -msgstr "ステータスを退席中に変更するかどうかを返します。これによって、実際にアイドル状態に移行した場合において、Discordクライアントにプッシュ通知をより適切に処理させることができます。" - -#: discord.ext.commands.Bot.change_presence:22 of -#, fuzzy -msgid "If the ``activity`` parameter is not the proper type." -msgstr ":exc:`.InvalidArgument` -- ``activity`` に渡された値が適切な型でない。" - -#: discord.ext.commands.Bot.check:1 of -msgid "A decorator that adds a global check to the bot." -msgstr "Botにグローバルチェックを追加するデコレーター" - -#: discord.ext.commands.Bot.check:3 of -msgid "" -"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." -msgstr "" -"このグローバルチェックは、 :func:`.check` " -"がコマンドごとに適用されるのと似ていますが、コマンドチェックが検証され、かつBotが持つすべてのコマンドが適用される前に実行される点で異なります。" - -#: discord.ext.commands.Bot.check:9 discord.ext.commands.Bot.check_once:19 of -msgid "This function can either be a regular function or a coroutine." -msgstr "この関数は、通常の関数かコルーチン、どちらでも成り得ます。" - -#: discord.ext.commands.Bot.check:11 discord.ext.commands.Bot.check_once:21 of -msgid "" -"Similar to a command :func:`.check`\\, this takes a single parameter of " -"type :class:`.Context` and can only raise exceptions inherited from " -":exc:`.CommandError`." -msgstr "" -":func:`.check` コマンドと同様、 :class:`.Context` 型の単一のパラメータを取り、 " -":exc:`.CommandError` から継承された例外のみを投げることができます。" - -#: discord.ext.commands.Bot.check_once:1 of -msgid "A decorator that adds a \"call once\" global check to the bot." -msgstr "Botに「一度だけ実行される」グローバルチェックを追加するデコレーター" - -#: discord.ext.commands.Bot.check_once:3 of -#, fuzzy -msgid "" -"Unlike regular global checks, this one is called only once per " -":meth:`.Command.invoke` call." -msgstr "通常のグローバルチェックと違って、これは :meth:`Command.invoke` が呼ばれる毎に一度だけ実行されます。" - -#: discord.ext.commands.Bot.check_once:6 of -msgid "" -"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." -msgstr "" -"通常のグローバルチェックは、コマンドが呼び出されるか :meth:`.Command.can_run` " -"が呼び出されるたび、実行されます。しかしこのグローバルチェックはそれを迂回し、デフォルトのhelpコマンドの中であっても、たった一度だけ呼ばれます。" - -#: discord.ext.commands.Bot.check_once:13 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.clear:1 of -msgid "Clears the internal state of the bot." -msgstr "Botの内部状態をクリアします。" - -#: discord.ext.commands.Bot.clear:3 of -msgid "" -"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." -msgstr "" -"これが実行されると、Botは「再実行」されたと見なされます。また、これにより :meth:`is_closed` や " -":meth:`is_ready` は ``False`` を返し、内部のキャッシュもクリアされます。" - -#: discord.ext.commands.Bot.cogs:1 of -#, fuzzy -msgid "A read-only mapping of cog name to cog." -msgstr "Mapping[:class:`str`, :class:`Cog`] -- コグ名から、コグへの読み取り専用マッピング。" - -#: discord.ext.commands.Bot.cogs:3 of -msgid "Mapping[:class:`str`, :class:`Cog`]" -msgstr "" - -#: discord.ext.commands.Bot.command:1 discord.ext.commands.Group.command:1 -#: discord.ext.commands.GroupMixin.command:1 of -msgid "" -"A shortcut decorator that invokes :func:`.command` and adds it to the " -"internal command list via :meth:`~.GroupMixin.add_command`." -msgstr "" -":func:`.command` を呼び出し、 :meth:`~.GroupMixin.add_command` " -"を介して内部コマンドリストに追加するショートカットデコレータ。" - -#: discord.ext.commands.Bot.command:4 discord.ext.commands.Group.command:4 -#: discord.ext.commands.GroupMixin.command:4 of -msgid "" -"A decorator that converts the provided method into a Command, adds it to " -"the bot, then returns it." -msgstr "" - -#: discord.ext.commands.Bot.command:5 discord.ext.commands.Group.command:5 -#: discord.ext.commands.GroupMixin.command:5 of -msgid "Callable[..., :class:`Command`]" -msgstr "" - -#: discord.ext.commands.Bot.commands:1 discord.ext.commands.Group.commands:1 -#: discord.ext.commands.GroupMixin.commands:1 of -#, fuzzy -msgid "A unique set of commands without aliases that are registered." -msgstr "Set[:class:`.Command`] -- 登録済みの別名がない固有のコマンドセット。" - -#: discord.ext.commands.Bot.commands:3 discord.ext.commands.Group.commands:3 -#: discord.ext.commands.GroupMixin.commands:3 of -#, fuzzy -msgid "Set[:class:`.Command`]" -msgstr ":class:`Command` またはサブクラス" - -#: discord.ext.commands.Bot.connect:3 of -msgid "" -"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." -msgstr "WebSocket接続を作成し、Discordからのメッセージをリッスンできるようにします。これはイベントシステム全体とライブラリの様々な機能を実行するループです。WebSocket接続が終了するまで、プログラムは再開されません。" - -#: discord.ext.commands.Bot.connect:8 of -msgid "" -"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)." -msgstr "" -"インターネットの障害やDiscord側の特定の障害が発生した際、再接続を試みるかどうかを表します。不正な状態へ移行する可能性がある特定の切断(無効なシャーディングpayloadや不正なトークンなど)" -" は処理されません。" - -#: discord.ext.commands.Bot.connect:14 of -#, fuzzy -msgid "" -"If the gateway to connect to Discord is not found. Usually if this is" -" thrown then there is a Discord API outage." -msgstr "" -":exc:`.GatewayNotFound` -- " -"Discordに接続するためのゲートウェイが見つからない。通常、これが発生した場合はDiscordAPIのエラーが考えられます。" - -#: discord.ext.commands.Bot.connect:15 of -#, fuzzy -msgid "The websocket connection has been terminated." -msgstr ":exc:`.ConnectionClosed` -- WebSocket接続は既に終了した。" - -#: discord.ext.commands.Bot.create_guild:3 of -msgid "Creates a :class:`.Guild`." -msgstr ":class:`.Guild` を作成します。" - -#: discord.ext.commands.Bot.create_guild:5 of -msgid "Bot accounts in more than 10 guilds are not allowed to create guilds." -msgstr "10以上のギルドに参加しているBotアカウントは、ギルドの作成ができません。" - -#: discord.ext.commands.Bot.create_guild:7 of -msgid "The name of the guild." -msgstr "ギルドの名前。" - -#: discord.ext.commands.Bot.create_guild:9 of -msgid "" -"The region for the voice communication server. Defaults to " -":attr:`.VoiceRegion.us_west`." -msgstr "音声通話に利用されるサーバーの地域。デフォルト値は :attr:`.VoiceRegion.us_west` 。" - -#: discord.ext.commands.Bot.create_guild:12 of -msgid "" -"The :term:`py:bytes-like object` representing the icon. See " -":meth:`.ClientUser.edit` for more details on what is expected." -msgstr "" - -#: discord.ext.commands.Bot.create_guild:15 of -msgid "The code for a template to create the guild with. .. versionadded:: 1.4" -msgstr "" - -#: discord.ext.commands.Bot.create_guild:15 of -msgid "The code for a template to create the guild with." -msgstr "" - -#: discord.ext.commands.Bot.create_guild:20 of -#, fuzzy -msgid "Guild creation failed." -msgstr ":exc:`.HTTPException` -- ギルドの作成に失敗した。" - -#: discord.ext.commands.Bot.create_guild:21 of -msgid "Invalid icon image format given. Must be PNG or JPG." -msgstr "" - -#: discord.ext.commands.Bot.create_guild:23 of -msgid "The guild created. This is not the same guild that is added to cache." -msgstr "" - -#: discord.ext.commands.Bot.create_guild:25 -#: discord.ext.commands.Bot.fetch_guild:21 of -msgid ":class:`.Guild`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Bot.delete_invite:3 of -msgid "Revokes an :class:`.Invite`, URL, or ID to an invite." -msgstr ":class:`.Invite` や、招待のURL、IDを削除します。" - -#: discord.ext.commands.Bot.delete_invite:5 of -msgid "" -"You must have the :attr:`~.Permissions.manage_channels` permission in the" -" associated guild to do this." -msgstr "これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` 権限が必要です。" - -#: discord.ext.commands.Bot.delete_invite:8 of -msgid "The invite to revoke." -msgstr "取り消す招待。" - -#: discord.ext.commands.Bot.delete_invite:11 of -#, fuzzy -msgid "You do not have permissions to revoke invites." -msgstr ":exc:`.Forbidden` -- 招待を取り消す権限が無い。" - -#: discord.ext.commands.Bot.delete_invite:12 of -#, fuzzy -msgid "The invite is invalid or expired." -msgstr ":exc:`.NotFound` -- 招待が無効、あるいは期限切れになっている。" - -#: discord.ext.commands.Bot.delete_invite:13 of -#, fuzzy -msgid "Revoking the invite failed." -msgstr ":exc:`.HTTPException` -- 招待の取り消しに失敗した。" - -#: discord.ext.commands.Bot.emojis:1 of -#, fuzzy -msgid "The emojis that the connected client has." -msgstr "List[:class:`.Emoji`] -- 接続したクライアントがアクセスできる絵文字。" - -#: discord.ext.commands.Bot.emojis:3 of -#, fuzzy -msgid "List[:class:`.Emoji`]" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Bot.event:1 of -msgid "A decorator that registers an event to listen to." -msgstr "リッスンするイベントを登録するデコレータ。" - -#: discord.ext.commands.Bot.event:3 of -msgid "" -"You can find more info about the events on the :ref:`documentation below " -"`." -msgstr "イベントの詳細については :ref:`以下のドキュメント ` を参照してください。" - -#: discord.ext.commands.Bot.event:5 of -msgid "" -"The events must be a :ref:`coroutine `, if not, " -":exc:`TypeError` is raised." -msgstr "イベントは :ref:`コルーチン ` でなければいけません。違う場合は :exc:`TypeError` が発生します。" - -#: discord.ext.commands.Bot.extensions:1 of -msgid "A read-only mapping of extension name to extension." -msgstr "" - -#: discord.ext.commands.Bot.extensions:3 of -msgid "Mapping[:class:`str`, :class:`py:types.ModuleType`]" -msgstr "" - -#: discord.ext.commands.Bot.fetch_channel:3 of -msgid "" -"Retrieves a :class:`.abc.GuildChannel` or :class:`.abc.PrivateChannel` " -"with the specified ID." -msgstr "" - -#: discord.ext.commands.Bot.fetch_channel:7 of -msgid "" -"This method is an API call. For general usage, consider " -":meth:`get_channel` instead." -msgstr "" - -#: discord.ext.commands.Bot.fetch_channel:11 of -msgid "An unknown channel type was received from Discord." -msgstr "" - -#: discord.ext.commands.Bot.fetch_channel:12 of -#, fuzzy -msgid "Retrieving the channel failed." -msgstr ":exc:`.HTTPException` -- チャンネルの取得に失敗した。" - -#: discord.ext.commands.Bot.fetch_channel:13 of -msgid "Invalid Channel ID." -msgstr "" - -#: discord.ext.commands.Bot.fetch_channel:14 of -#, fuzzy -msgid "You do not have permission to fetch this channel." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.ext.commands.Bot.fetch_channel:16 of -msgid "The channel from the ID." -msgstr "IDから取得したチャンネル。" - -#: discord.ext.commands.Bot.fetch_channel:17 of -msgid "Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]" -msgstr "Union[ :class:`.abc.GuildChannel` , :class:`.abc.PrivateChannel` ]" - -#: discord.ext.commands.Bot.fetch_guild:3 of -msgid "Retrieves a :class:`.Guild` from an ID." -msgstr "IDから :class:`.Guild` を取得します。" - -#: discord.ext.commands.Bot.fetch_guild:7 of -#, fuzzy -msgid "" -"Using this, you will **not** receive :attr:`.Guild.channels`, " -":attr:`.Guild.members`, :attr:`.Member.activity` and " -":attr:`.Member.voice` per :class:`.Member`." -msgstr "" -"これを使用した場合、 :attr:`.Guild.channels` 、 :class:`.Guild.members` 、そして各 " -":class:`.Member` ごとの :attr:`.Member.activity` 、 :attr:`.Member.voice` " -"を取得することは **できません** 。" - -#: discord.ext.commands.Bot.fetch_guild:12 of -msgid "" -"This method is an API call. For general usage, consider :meth:`get_guild`" -" instead." -msgstr "このメソッドはAPIを呼び出します。通常は :meth:`get_guild` を代わりとして使用してください。" - -#: discord.ext.commands.Bot.fetch_guild:14 of -msgid "The guild's ID to fetch from." -msgstr "取得したいギルドのID。" - -#: discord.ext.commands.Bot.fetch_guild:17 of -#, fuzzy -msgid "You do not have access to the guild." -msgstr ":exc:`.Forbidden` -- ギルドにアクセスできない。" - -#: discord.ext.commands.Bot.fetch_guild:18 of -#, fuzzy -msgid "Getting the guild failed." -msgstr ":exc:`.HTTPException` -- ギルドの取得に失敗した。" - -#: discord.ext.commands.Bot.fetch_guild:20 of -msgid "The guild from the ID." -msgstr "IDから取得したギルド。" - -#: discord.ext.commands.Bot.fetch_guilds:3 of -msgid "Retrieves an :class:`.AsyncIterator` that enables receiving your guilds." -msgstr "Botが所属するGuildを取得できる、 :class:`AsyncIterator` を取得します。" - -#: discord.ext.commands.Bot.fetch_guilds:7 of -msgid "" -"Using this, you will only receive :attr:`.Guild.owner`, " -":attr:`.Guild.icon`, :attr:`.Guild.id`, and :attr:`.Guild.name` per " -":class:`.Guild`." -msgstr "" -"これを使った場合、各 :class:`Guild` の :attr:`Guild.owner` 、 :attr:`Guild.icon` 、 " -":attr:`Guild.id` 、 :attr:`Guild.name` のみ取得できます。" - -#: discord.ext.commands.Bot.fetch_guilds:12 of -msgid "" -"This method is an API call. For general usage, consider :attr:`guilds` " -"instead." -msgstr "これはAPIを呼び出します。通常は :attr:`guilds` を代わりに使用してください。" - -#: discord.ext.commands.Bot.fetch_guilds:15 -#: discord.ext.commands.Bot.wait_for:22 discord.ext.commands.Context.history:6 -#: discord.ext.commands.check:37 discord.ext.commands.check_any:20 of -msgid "Examples" -msgstr "例" - -#: discord.ext.commands.Bot.fetch_guilds:16 -#: discord.ext.commands.Context.history:7 of -msgid "Usage ::" -msgstr "使い方 ::" - -#: discord.ext.commands.Bot.fetch_guilds:21 of -msgid "Flattening into a list ::" -msgstr "リストへフラット化 ::" - -#: discord.ext.commands.Bot.fetch_guilds:26 -#: discord.ext.commands.Context.history:19 of -msgid "All parameters are optional." -msgstr "すべてのパラメータがオプションです。" - -#: discord.ext.commands.Bot.fetch_guilds:28 of -#, fuzzy -msgid "" -"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 ``100``." -msgstr "" -"取得するギルドの数。 ``None`` " -"の場合、あなたがアクセスできるギルドすべてを取得します。ただし、これには時間がかかります。デフォルトは100です。" - -#: discord.ext.commands.Bot.fetch_guilds:33 of -msgid "" -"Retrieves guilds before this date or object. If a date is provided it " -"must be a timezone-naive datetime representing UTC time." -msgstr "" -"この日付またはオブジェクトの前のGuildを取得します。もし日付が与えられた場合は、それはUTC時刻を表し、timezone " -"naiveであるdatetimeでないといけません。" - -#: discord.ext.commands.Bot.fetch_guilds:36 of -msgid "" -"Retrieve guilds after this date or object. If a date is provided it must " -"be a timezone-naive datetime representing UTC time." -msgstr "" -"この日付またはオブジェクトの後のGuildを取得します。もし日付が与えられた場合は、それはUTC時刻を表し、timezone " -"naiveであるdatetimeでないといけません。" - -#: discord.ext.commands.Bot.fetch_guilds:40 of -#, fuzzy -msgid "Getting the guilds failed." -msgstr ":exc:`.HTTPException` -- ギルドの取得に失敗した。" - -#: discord.ext.commands.Bot.fetch_guilds -#: discord.ext.commands.Bot.get_all_channels -#: discord.ext.commands.Bot.get_all_members -#: discord.ext.commands.Bot.walk_commands -#: discord.ext.commands.Cog.walk_commands discord.ext.commands.Context.history -#: discord.ext.commands.Group.walk_commands -#: discord.ext.commands.GroupMixin.walk_commands of -msgid "Yields" -msgstr "Yieldする値" - -#: discord.ext.commands.Bot.fetch_guilds:42 of -msgid ":class:`.Guild` -- The guild with the guild data parsed." -msgstr ":class:`.Guild` -- データを解析したGuild。" - -#: discord.ext.commands.Bot.fetch_invite:3 of -msgid "Gets an :class:`.Invite` from a discord.gg URL or ID." -msgstr "" - -#: discord.ext.commands.Bot.fetch_invite:7 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.fetch_invite:11 of -msgid "The Discord invite ID or URL (must be a discord.gg URL)." -msgstr "" - -#: discord.ext.commands.Bot.fetch_invite:13 of -msgid "" -"Whether to include count information in the invite. This fills the " -":attr:`.Invite.approximate_member_count` and " -":attr:`.Invite.approximate_presence_count` fields." -msgstr "" - -#: discord.ext.commands.Bot.fetch_invite:18 of -msgid "The invite has expired or is invalid." -msgstr "" - -#: discord.ext.commands.Bot.fetch_invite:19 of -#, fuzzy -msgid "Getting the invite failed." -msgstr ":exc:`.HTTPException` -- 招待の取り消しに失敗した。" - -#: discord.ext.commands.Bot.fetch_invite:21 of -msgid "The invite from the URL/ID." -msgstr "" - -#: discord.ext.commands.Bot.fetch_invite:22 of -msgid ":class:`.Invite`" -msgstr "" - -#: discord.ext.commands.Bot.fetch_template:3 of -msgid "Gets a :class:`.Template` from a discord.new URL or code." -msgstr "" - -#: discord.ext.commands.Bot.fetch_template:5 of -msgid "The Discord Template Code or URL (must be a discord.new URL)." -msgstr "" - -#: discord.ext.commands.Bot.fetch_template:8 of -msgid "The template is invalid." -msgstr "" - -#: discord.ext.commands.Bot.fetch_template:9 of -msgid "Getting the template failed." -msgstr "" - -#: discord.ext.commands.Bot.fetch_template:11 of -#, fuzzy -msgid "The template from the URL/code." -msgstr "ギルドの名前。" - -#: discord.ext.commands.Bot.fetch_template:12 of -#, fuzzy -msgid ":class:`.Template`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Bot.fetch_user:3 of -msgid "" -"Retrieves a :class:`~discord.User` based on their ID. This can only be " -"used by bot accounts. You do not have to share any guilds with the user " -"to get this information, however many operations do require that you do." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user:10 of -msgid "" -"This method is an API call. For general usage, consider :meth:`get_user` " -"instead." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user:12 of -msgid "The user's ID to fetch from." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user:15 of -msgid "A user with this ID does not exist." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user:16 of -msgid "Fetching the user failed." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user:18 of -msgid "The user you requested." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user:19 of -msgid ":class:`~discord.User`" -msgstr "" - -#: discord.ext.commands.Bot.fetch_user_profile:3 of -msgid "Gets an arbitrary user's profile." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user_profile:7 of -msgid "This can only be used by non-bot accounts." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user_profile:9 of -msgid "The ID of the user to fetch their profile for." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user_profile:12 of -msgid "Not allowed to fetch profiles." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user_profile:13 of -msgid "Fetching the profile failed." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user_profile:15 of -msgid "The profile of the user." -msgstr "" - -#: discord.ext.commands.Bot.fetch_user_profile:16 of -msgid ":class:`.Profile`" -msgstr "" - -#: discord.ext.commands.Bot.fetch_webhook:3 of -msgid "Retrieves a :class:`.Webhook` with the specified ID." -msgstr "" - -#: discord.ext.commands.Bot.fetch_webhook:5 of -msgid "Retrieving the webhook failed." -msgstr "" - -#: discord.ext.commands.Bot.fetch_webhook:6 of -msgid "Invalid webhook ID." -msgstr "" - -#: discord.ext.commands.Bot.fetch_webhook:7 of -#, fuzzy -msgid "You do not have permission to fetch this webhook." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.ext.commands.Bot.fetch_webhook:9 of -msgid "The webhook you requested." -msgstr "" - -#: discord.ext.commands.Bot.fetch_webhook:10 of -msgid ":class:`.Webhook`" -msgstr "" - -#: discord.ext.commands.Bot.fetch_widget:3 of -msgid "Gets a :class:`.Widget` from a guild ID." -msgstr "" - -#: discord.ext.commands.Bot.fetch_widget:7 of -msgid "The guild must have the widget enabled to get this information." -msgstr "" - -#: discord.ext.commands.Bot.fetch_widget:9 of -msgid "The ID of the guild." -msgstr "" - -#: discord.ext.commands.Bot.fetch_widget:12 of -msgid "The widget for this guild is disabled." -msgstr "" - -#: discord.ext.commands.Bot.fetch_widget:13 of -msgid "Retrieving the widget failed." -msgstr "" - -#: discord.ext.commands.Bot.fetch_widget:15 of -msgid "The guild's widget." -msgstr "" - -#: discord.ext.commands.Bot.fetch_widget:16 of -msgid ":class:`.Widget`" -msgstr "" - -#: discord.ext.commands.Bot.get_all_channels:1 of -msgid "" -"A generator that retrieves every :class:`.abc.GuildChannel` the client " -"can 'access'." -msgstr "" - -#: discord.ext.commands.Bot.get_all_channels:3 -#: discord.ext.commands.Bot.get_all_members:3 of -msgid "This is equivalent to: ::" -msgstr "" - -#: discord.ext.commands.Bot.get_all_channels:11 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.get_all_channels:15 of -msgid ":class:`.abc.GuildChannel` -- A channel the client can 'access'." -msgstr "" - -#: discord.ext.commands.Bot.get_all_members:1 of -msgid "Returns a generator with every :class:`.Member` the client can see." -msgstr "" - -#: discord.ext.commands.Bot.get_all_members:9 of -msgid ":class:`.Member` -- A member the client can see." -msgstr "" - -#: discord.ext.commands.Bot.get_channel:1 of -msgid "Returns a channel with the given ID." -msgstr "" - -#: discord.ext.commands.Bot.get_channel:3 discord.ext.commands.Bot.get_emoji:3 -#: discord.ext.commands.Bot.get_guild:3 discord.ext.commands.Bot.get_user:3 of -#, fuzzy -msgid "The ID to search for." -msgstr "取得したいギルドのID。" - -#: discord.ext.commands.Bot.get_channel:6 of -msgid "The returned channel or ``None`` if not found." -msgstr "" - -#: discord.ext.commands.Bot.get_channel:7 of -#, fuzzy -msgid "Optional[Union[:class:`.abc.GuildChannel`, :class:`.abc.PrivateChannel`]]" -msgstr "Union[ :class:`.abc.GuildChannel` , :class:`.abc.PrivateChannel` ]" - -#: discord.ext.commands.Bot.get_cog:1 of -msgid "Gets the cog instance requested." -msgstr "" - -#: discord.ext.commands.Bot.get_cog:3 of -msgid "If the cog is not found, ``None`` is returned instead." -msgstr "" - -#: discord.ext.commands.Bot.get_cog:5 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.get_cog:10 of -msgid "The cog that was requested. If not found, returns ``None``." -msgstr "" - -#: discord.ext.commands.Bot.get_cog:11 discord.ext.commands.Command:62 -#: discord.ext.commands.HelpCommand.cog:10 of -msgid "Optional[:class:`Cog`]" -msgstr "" - -#: discord.ext.commands.Bot.get_command:1 -#: discord.ext.commands.Group.get_command:1 -#: discord.ext.commands.GroupMixin.get_command:1 of -#, fuzzy -msgid "Get a :class:`.Command` from the internal list of commands." -msgstr ":class:`.Command`やそのサブクラスを内部のコマンドリストに追加します。" - -#: discord.ext.commands.Bot.get_command:4 -#: discord.ext.commands.Group.get_command:4 -#: discord.ext.commands.GroupMixin.get_command:4 of -msgid "This could also be used as a way to get aliases." -msgstr "" - -#: discord.ext.commands.Bot.get_command:6 -#: discord.ext.commands.Group.get_command:6 -#: discord.ext.commands.GroupMixin.get_command:6 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.get_command:10 -#: discord.ext.commands.Group.get_command:10 -#: discord.ext.commands.GroupMixin.get_command:10 of -msgid "The name of the command to get." -msgstr "" - -#: discord.ext.commands.Bot.get_command:13 -#: discord.ext.commands.Group.get_command:13 -#: discord.ext.commands.GroupMixin.get_command:13 of -msgid "The command that was requested. If not found, returns ``None``." -msgstr "" - -#: discord.ext.commands.Bot.get_command:14 discord.ext.commands.Command:56 -#: discord.ext.commands.Command:103 discord.ext.commands.Command.root_parent:7 -#: discord.ext.commands.Group.get_command:14 -#: discord.ext.commands.Group.root_parent:7 -#: discord.ext.commands.GroupMixin.get_command:14 of -msgid "Optional[:class:`Command`]" -msgstr "" - -#: discord.ext.commands.Bot.get_context:3 of -msgid "Returns the invocation context from the message." -msgstr "" - -#: discord.ext.commands.Bot.get_context:5 of -msgid "" -"This is a more low-level counter-part for :meth:`.process_commands` to " -"allow users more fine grained control over the processing." -msgstr "" - -#: discord.ext.commands.Bot.get_context:8 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.Bot.get_context:13 of -msgid "The message to get the invocation context from." -msgstr "" - -#: discord.ext.commands.Bot.get_context:15 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.get_context:20 of -msgid "" -"The invocation context. The type of this can change via the ``cls`` " -"parameter." -msgstr "" - -#: discord.ext.commands.Bot.get_context:22 of -msgid ":class:`.Context`" -msgstr "" - -#: discord.ext.commands.Bot.get_emoji:1 of -msgid "Returns an emoji with the given ID." -msgstr "" - -#: discord.ext.commands.Bot.get_emoji:6 of -msgid "The custom emoji or ``None`` if not found." -msgstr "" - -#: discord.ext.commands.Bot.get_emoji:7 of -msgid "Optional[:class:`.Emoji`]" -msgstr "" - -#: discord.ext.commands.Bot.get_guild:1 of -msgid "Returns a guild with the given ID." -msgstr "" - -#: discord.ext.commands.Bot.get_guild:6 of -msgid "The guild or ``None`` if not found." -msgstr "" - -#: discord.ext.commands.Bot.get_guild:7 discord.ext.commands.Context.guild:3 of -#, fuzzy -msgid "Optional[:class:`.Guild`]" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Bot.get_prefix:3 of -msgid "" -"Retrieves the prefix the bot is listening to with the message as a " -"context." -msgstr "" - -#: discord.ext.commands.Bot.get_prefix:6 of -msgid "The message context to get the prefix of." -msgstr "" - -#: discord.ext.commands.Bot.get_prefix:9 of -msgid "A list of prefixes or a single prefix that the bot is listening for." -msgstr "" - -#: discord.ext.commands.Bot.get_prefix:11 of -msgid "Union[List[:class:`str`], :class:`str`]" -msgstr "" - -#: discord.ext.commands.Bot.get_user:1 of -msgid "Returns a user with the given ID." -msgstr "" - -#: discord.ext.commands.Bot.get_user:6 of -msgid "The user or ``None`` if not found." -msgstr "" - -#: discord.ext.commands.Bot.get_user:7 of -msgid "Optional[:class:`~discord.User`]" -msgstr "" - -#: discord.ext.commands.Bot.group:1 discord.ext.commands.Group.group:1 -#: discord.ext.commands.GroupMixin.group:1 of -msgid "" -"A shortcut decorator that invokes :func:`.group` and adds it to the " -"internal command list via :meth:`~.GroupMixin.add_command`." -msgstr "" - -#: discord.ext.commands.Bot.group:4 discord.ext.commands.Group.group:4 -#: discord.ext.commands.GroupMixin.group:4 of -msgid "" -"A decorator that converts the provided method into a Group, adds it to " -"the bot, then returns it." -msgstr "" - -#: discord.ext.commands.Bot.group:5 discord.ext.commands.Group.group:5 -#: discord.ext.commands.GroupMixin.group:5 of -msgid "Callable[..., :class:`Group`]" -msgstr "" - -#: discord.ext.commands.Bot.guilds:1 of -msgid "The guilds that the connected client is a member of." -msgstr "" - -#: discord.ext.commands.Bot.guilds:3 of -#, fuzzy -msgid "List[:class:`.Guild`]" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Bot.intents:1 of -msgid "The intents configured for this connection." -msgstr "" - -#: discord.ext.commands.Bot.intents:5 of -#, fuzzy -msgid ":class:`Intents`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Bot.invoke:3 of -msgid "" -"Invokes the command given under the invocation context and handles all " -"the internal event dispatch mechanisms." -msgstr "" - -#: discord.ext.commands.Bot.invoke:6 of -msgid "The invocation context to invoke." -msgstr "" - -#: discord.ext.commands.Bot.is_closed:1 of -msgid ":class:`bool`: Indicates if the websocket connection is closed." -msgstr "" - -#: discord.ext.commands.Bot.is_owner:3 of -msgid "" -"Checks if a :class:`~discord.User` or :class:`~discord.Member` is the " -"owner of this bot." -msgstr "" - -#: discord.ext.commands.Bot.is_owner:6 of -msgid "" -"If an :attr:`owner_id` is not set, it is fetched automatically through " -"the use of :meth:`~.Bot.application_info`." -msgstr "" - -#: discord.ext.commands.Bot.is_owner:9 of -msgid "" -"The function also checks if the application is team-owned if " -":attr:`owner_ids` is not set." -msgstr "" - -#: discord.ext.commands.Bot.is_owner:13 of -msgid "The user to check for." -msgstr "" - -#: discord.ext.commands.Bot.is_owner:16 of -msgid "Whether the user is the owner." -msgstr "" - -#: discord.ext.commands.Bot.is_ready:1 of -msgid ":class:`bool`: Specifies if the client's internal cache is ready for use." -msgstr "" - -#: discord.ext.commands.Bot.latency:1 of -msgid "Measures latency between a HEARTBEAT and a HEARTBEAT_ACK in seconds." -msgstr "" - -#: discord.ext.commands.Bot.latency:3 of -msgid "This could be referred to as the Discord WebSocket protocol latency." -msgstr "" - -#: discord.ext.commands.Bot.latency:5 -#: discord.ext.commands.Command.get_cooldown_retry_after:10 -#: discord.ext.commands.CommandOnCooldown:16 -#: discord.ext.commands.Group.get_cooldown_retry_after:10 of -#, fuzzy -msgid ":class:`float`" -msgstr ":class:`.AppInfo`" - -#: discord.ext.commands.Bot.listen:1 of -msgid "" -"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`" -msgstr "" - -#: discord.ext.commands.Bot.listen:5 of -msgid "The functions being listened to must be a :ref:`coroutine `." -msgstr "" - -#: discord.ext.commands.Bot.listen:21 of -msgid "Would print one and two in an unspecified order." -msgstr "" - -#: discord.ext.commands.Bot.listen:23 of -#, fuzzy -msgid "The function being listened to is not a coroutine." -msgstr ":exc:`TypeError` -- 渡された関数がコルーチンでない。" - -#: discord.ext.commands.Bot.load_extension:1 of -msgid "Loads an extension." -msgstr "" - -#: discord.ext.commands.Bot.load_extension:3 of -msgid "" -"An extension is a python module that contains commands, cogs, or " -"listeners." -msgstr "" - -#: discord.ext.commands.Bot.load_extension:6 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Bot.load_extension:10 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Bot.load_extension:15 -#: discord.ext.commands.Bot.reload_extension:14 of -msgid "The extension could not be imported." -msgstr "" - -#: discord.ext.commands.Bot.load_extension:16 of -msgid "The extension is already loaded." -msgstr "" - -#: discord.ext.commands.Bot.load_extension:17 -#: discord.ext.commands.Bot.reload_extension:15 of -msgid "The extension does not have a setup function." -msgstr "" - -#: discord.ext.commands.Bot.load_extension:18 of -msgid "The extension or its setup function had an execution error." -msgstr "" - -#: discord.ext.commands.Bot.login:3 of -msgid "Logs in the client with the specified credentials." -msgstr "" - -#: discord.ext.commands.Bot.login:5 of -msgid "This function can be used in two different ways." -msgstr "" - -#: discord.ext.commands.Bot.login:9 of -msgid "" -"Logging on with a user token is against the Discord `Terms of Service " -"`_ and doing " -"so might potentially get your account banned. Use this at your own risk." -msgstr "" - -#: discord.ext.commands.Bot.login:14 of -msgid "" -"The authentication token. Do not prefix this token with anything as the " -"library will do it for you." -msgstr "" - -#: discord.ext.commands.Bot.login:17 of -msgid "" -"Keyword argument that specifies if the account logging on is a bot token " -"or not." -msgstr "" - -#: discord.ext.commands.Bot.login:21 of -msgid "The wrong credentials are passed." -msgstr "" - -#: discord.ext.commands.Bot.login:22 of -msgid "" -"An unknown HTTP related error occurred, usually when it isn't 200 or " -"the known incorrect credentials passing status code." -msgstr "" - -#: discord.ext.commands.Bot.logout:3 of -msgid "Logs out of Discord and closes all connections." -msgstr "" - -#: discord.ext.commands.Bot.logout:7 of -msgid "" -"This is just an alias to :meth:`close`. If you want to do extraneous " -"cleanup when subclassing, it is suggested to override :meth:`close` " -"instead." -msgstr "" - -#: discord.ext.commands.Bot.on_command_error:3 of -msgid "The default command error handler provided by the bot." -msgstr "" - -#: discord.ext.commands.Bot.on_command_error:5 of -msgid "" -"By default this prints to :data:`sys.stderr` however it could be " -"overridden to have a different implementation." -msgstr "" - -#: discord.ext.commands.Bot.on_command_error:8 of -msgid "This only fires if you do not specify any listeners for command error." -msgstr "" - -#: discord.ext.commands.Bot.on_error:3 of -msgid "The default error handler provided by the client." -msgstr "" - -#: discord.ext.commands.Bot.on_error:5 of -msgid "" -"By default this prints to :data:`sys.stderr` however it could be " -"overridden to have a different implementation. Check " -":func:`~discord.on_error` for more details." -msgstr "" - -#: discord.ext.commands.Bot.private_channels:1 of -msgid "The private channels that the connected client is participating on." -msgstr "" - -#: discord.ext.commands.Bot.private_channels:5 of -msgid "" -"This returns only up to 128 most recent private channels due to an " -"internal working on how Discord deals with private channels." -msgstr "" - -#: discord.ext.commands.Bot.private_channels:8 of -msgid "List[:class:`.abc.PrivateChannel`]" -msgstr "" - -#: discord.ext.commands.Bot.process_commands:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.process_commands:7 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.process_commands:11 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.Bot.process_commands:14 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.process_commands:17 of -msgid "The message to process commands for." -msgstr "" - -#: discord.ext.commands.Bot.reload_extension:1 of -msgid "Atomically reloads an extension." -msgstr "" - -#: discord.ext.commands.Bot.reload_extension:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.reload_extension:8 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Bot.reload_extension:13 -#: discord.ext.commands.Bot.unload_extension:16 of -msgid "The extension was not loaded." -msgstr "" - -#: discord.ext.commands.Bot.reload_extension:16 of -msgid "The extension setup function had an execution error." -msgstr "" - -#: discord.ext.commands.Bot.remove_check:1 of -msgid "Removes a global check from the bot." -msgstr "" - -#: discord.ext.commands.Bot.remove_check:3 of -msgid "" -"This function is idempotent and will not raise an exception if the " -"function is not in the global checks." -msgstr "" - -#: discord.ext.commands.Bot.remove_check:6 of -msgid "The function to remove from the global checks." -msgstr "" - -#: discord.ext.commands.Bot.remove_check:7 of -msgid "" -"If the function was added with ``call_once=True`` in the " -":meth:`.Bot.add_check` call or using :meth:`.check_once`." -msgstr "" - -#: discord.ext.commands.Bot.remove_cog:1 of -msgid "Removes a cog from the bot." -msgstr "" - -#: discord.ext.commands.Bot.remove_cog:3 of -msgid "" -"All registered commands and event listeners that the cog has registered " -"will be removed as well." -msgstr "" - -#: discord.ext.commands.Bot.remove_cog:6 of -msgid "If no cog is found then this method has no effect." -msgstr "" - -#: discord.ext.commands.Bot.remove_cog:8 of -msgid "The name of the cog to remove." -msgstr "" - -#: discord.ext.commands.Bot.remove_command:1 -#: discord.ext.commands.Group.remove_command:1 -#: discord.ext.commands.GroupMixin.remove_command:1 of -#, fuzzy -msgid "Remove a :class:`.Command` from the internal list of commands." -msgstr ":class:`.Command`やそのサブクラスを内部のコマンドリストに追加します。" - -#: discord.ext.commands.Bot.remove_command:4 -#: discord.ext.commands.Group.remove_command:4 -#: discord.ext.commands.GroupMixin.remove_command:4 of -msgid "This could also be used as a way to remove aliases." -msgstr "" - -#: discord.ext.commands.Bot.remove_command:6 -#: discord.ext.commands.Group.remove_command:6 -#: discord.ext.commands.GroupMixin.remove_command:6 of -msgid "The name of the command to remove." -msgstr "" - -#: discord.ext.commands.Bot.remove_command:9 -#: discord.ext.commands.Group.remove_command:9 -#: discord.ext.commands.GroupMixin.remove_command:9 of -msgid "" -"The command that was removed. If the name is not valid then ``None`` is " -"returned instead." -msgstr "" - -#: discord.ext.commands.Bot.remove_command:11 -#: discord.ext.commands.Group.remove_command:11 -#: discord.ext.commands.GroupMixin.remove_command:11 of -msgid "Optional[:class:`.Command`]" -msgstr "" - -#: discord.ext.commands.Bot.remove_listener:1 of -msgid "Removes a listener from the pool of listeners." -msgstr "" - -#: discord.ext.commands.Bot.remove_listener:3 of -msgid "The function that was used as a listener to remove." -msgstr "" - -#: discord.ext.commands.Bot.remove_listener:4 of -msgid "The name of the event we want to remove. Defaults to ``func.__name__``." -msgstr "削除したいイベントの名前。デフォルトでは ``func.__name__`` です。" - -#: discord.ext.commands.Bot.request_offline_members:3 of -msgid "" -"Requests previously offline members from the guild to be filled up into " -"the :attr:`.Guild.members` cache. This function is usually not called. It" -" should only be used if you have the ``fetch_offline_members`` parameter " -"set to ``False``." -msgstr "" - -#: discord.ext.commands.Bot.request_offline_members:8 of -msgid "" -"When the client logs on and connects to the websocket, Discord does not " -"provide the library with offline members if the number of members in the " -"guild is larger than 250. You can check if a guild is large if " -":attr:`.Guild.large` is ``True``." -msgstr "" - -#: discord.ext.commands.Bot.request_offline_members:15 of -#, fuzzy -msgid "This method is deprecated. Use :meth:`Guild.chunk` instead." -msgstr "このメソッドはAPIを呼び出します。通常は :meth:`get_guild` を代わりとして使用してください。" - -#: discord.ext.commands.Bot.request_offline_members:17 of -msgid "An argument list of guilds to request offline members for." -msgstr "" - -#: discord.ext.commands.Bot.request_offline_members:20 of -msgid "If any guild is unavailable in the collection." -msgstr "" - -#: discord.ext.commands.Bot.run:1 of -msgid "" -"A blocking call that abstracts away the event loop initialisation from " -"you." -msgstr "" - -#: discord.ext.commands.Bot.run:4 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.Bot.run:8 of -msgid "Roughly Equivalent to: ::" -msgstr "" - -#: discord.ext.commands.Bot.run:20 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.start:3 of -msgid "A shorthand coroutine for :meth:`login` + :meth:`connect`." -msgstr "" - -#: discord.ext.commands.Bot.start:5 of -msgid "An unexpected keyword argument was received." -msgstr "" - -#: discord.ext.commands.Bot.unload_extension:1 of -msgid "Unloads an extension." -msgstr "" - -#: discord.ext.commands.Bot.unload_extension:3 of -msgid "" -"When the extension is unloaded, all commands, listeners, and cogs are " -"removed from the bot and the module is un-imported." -msgstr "" - -#: discord.ext.commands.Bot.unload_extension:6 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.Bot.unload_extension:11 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Bot.user:1 of -msgid "Represents the connected client. ``None`` if not logged in." -msgstr "" - -#: discord.ext.commands.Bot.user:3 of -msgid "Optional[:class:`.ClientUser`]" -msgstr "" - -#: discord.ext.commands.Bot.users:1 of -msgid "Returns a list of all the users the bot can see." -msgstr "" - -#: discord.ext.commands.Bot.users:3 of -msgid "List[:class:`~discord.User`]" -msgstr "" - -#: discord.ext.commands.Bot.voice_clients:1 of -msgid "Represents a list of voice connections." -msgstr "" - -#: discord.ext.commands.Bot.voice_clients:3 of -msgid "These are usually :class:`.VoiceClient` instances." -msgstr "" - -#: discord.ext.commands.Bot.voice_clients:5 of -msgid "List[:class:`.VoiceProtocol`]" -msgstr "" - -#: discord.ext.commands.Bot.wait_for:3 of -msgid "Waits for a WebSocket event to be dispatched." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:5 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:9 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:14 of -msgid "" -"In case the event returns multiple arguments, a :class:`tuple` containing" -" those arguments is returned instead. Please check the " -":ref:`documentation ` for a list of events and their " -"parameters." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:19 of -msgid "This function returns the **first event that meets the requirements**." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:23 of -msgid "Waiting for a user reply: ::" -msgstr "" - -#: discord.ext.commands.Bot.wait_for:37 of -msgid "Waiting for a thumbs up reaction from the message author: ::" -msgstr "" - -#: discord.ext.commands.Bot.wait_for:55 of -msgid "" -"The event name, similar to the :ref:`event reference `, but without the ``on_`` prefix, to wait for." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:58 of -msgid "" -"A predicate to check what to wait for. The arguments must meet the " -"parameters of the event being waited for." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:61 of -msgid "" -"The number of seconds to wait before timing out and raising " -":exc:`asyncio.TimeoutError`." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:65 of -msgid "If a timeout is provided and it was reached." -msgstr "" - -#: discord.ext.commands.Bot.wait_for:67 of -msgid "" -"Returns no arguments, a single argument, or a :class:`tuple` of multiple " -"arguments that mirrors the parameters passed in the :ref:`event reference" -" `." -msgstr "" - -#: discord.ext.commands.Bot.wait_until_ready:3 of -msgid "Waits until the client's internal cache is all ready." -msgstr "" - -#: discord.ext.commands.Bot.walk_commands:1 -#: discord.ext.commands.Group.walk_commands:1 -#: discord.ext.commands.GroupMixin.walk_commands:1 of -msgid "An iterator that recursively walks through all commands and subcommands." -msgstr "" - -#: discord.ext.commands.Bot.walk_commands:3 -#: discord.ext.commands.Group.walk_commands:3 -#: discord.ext.commands.GroupMixin.walk_commands:3 of -msgid "Duplicates due to aliases are no longer returned" -msgstr "" - -#: discord.ext.commands.Bot.walk_commands:6 -#: discord.ext.commands.Group.walk_commands:6 -#: discord.ext.commands.GroupMixin.walk_commands:6 of -#, fuzzy -msgid "" -"Union[:class:`.Command`, :class:`.Group`] -- A command or group from the " -"internal list of commands." -msgstr ":class:`.Command`やそのサブクラスを内部のコマンドリストに追加します。" - -#: discord.ext.commands.AutoShardedBot:1 of -msgid "" -"This is similar to :class:`.Bot` except that it is inherited from " -":class:`discord.AutoShardedClient` instead." -msgstr "" - -#: discord.ext.commands.when_mentioned:1 of -msgid "A callable that implements a command prefix equivalent to being mentioned." -msgstr "" - -#: discord.ext.commands.when_mentioned:3 -#: discord.ext.commands.when_mentioned_or:3 of -msgid "" -"These are meant to be passed into the :attr:`.Bot.command_prefix` " -"attribute." -msgstr "" - -#: discord.ext.commands.when_mentioned_or:1 of -msgid "A callable that implements when mentioned or other prefixes provided." -msgstr "" - -#: discord.ext.commands.when_mentioned_or:13 of -msgid "" -"This callable returns another callable, so if this is done inside a " -"custom callable, you must call the returned callable, for example:" -msgstr "" - -#: discord.ext.commands.when_mentioned_or:23 of -msgid ":func:`.when_mentioned`" -msgstr "" - -#: ../../ext/commands/api.rst:27 -msgid "Event Reference" -msgstr "イベントリファレンス" - -#: ../../ext/commands/api.rst:29 -msgid "" -"These events function similar to :ref:`the regular events `, except they are custom to the command extension module." -msgstr "" - -#: ../../ext/commands/api.rst:34 -msgid "" -"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." -msgstr "" - -#: ../../ext/commands/api.rst:38 -msgid "A default one is provided (:meth:`.Bot.on_command_error`)." -msgstr "" - -#: ../../ext/commands/api.rst:40 ../../ext/commands/api.rst:52 -#: ../../ext/commands/api.rst:62 discord.ext.commands.Cog.cog_after_invoke:7 -#: discord.ext.commands.Cog.cog_before_invoke:7 -#: discord.ext.commands.HelpCommand.on_help_command_error:11 -#: discord.ext.commands.HelpCommand.prepare_help_command:15 of -msgid "The invocation context." -msgstr "" - -#: ../../ext/commands/api.rst:42 -#: discord.ext.commands.HelpCommand.on_help_command_error:13 of -msgid "The error that was raised." -msgstr "" - -#: ../../ext/commands/api.rst:47 -msgid "" -"An event that is called when a command is found and is about to be " -"invoked." -msgstr "" - -#: ../../ext/commands/api.rst:49 -msgid "" -"This event is called regardless of whether the command itself succeeds " -"via error or completes." -msgstr "" - -#: ../../ext/commands/api.rst:57 -msgid "An event that is called when a command has completed its invocation." -msgstr "" - -#: ../../ext/commands/api.rst:59 -msgid "" -"This event is called only if the command succeeded, i.e. all checks have " -"passed and the user input it correctly." -msgstr "" - -#: ../../ext/commands/api.rst:68 -msgid "Command" -msgstr "Command" - -#: discord.ext.commands.command:1 of -msgid "" -"A decorator that transforms a function into a :class:`.Command` or if " -"called with :func:`.group`, :class:`.Group`." -msgstr "" - -#: discord.ext.commands.command:4 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.command:9 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.command:13 of -msgid "" -"The name to create the command with. By default this uses the function " -"name unchanged." -msgstr "" - -#: discord.ext.commands.command:16 of -msgid "" -"The class to construct with. By default this is :class:`.Command`. You " -"usually do not change this." -msgstr "" - -#: discord.ext.commands.command:18 of -msgid "" -"Keyword arguments to pass into the construction of the class denoted by " -"``cls``." -msgstr "" - -#: discord.ext.commands.command:21 of -msgid "If the function is not a coroutine or is already a command." -msgstr "" - -#: discord.ext.commands.group:1 of -msgid "A decorator that transforms a function into a :class:`.Group`." -msgstr "" - -#: discord.ext.commands.group:3 of -msgid "" -"This is similar to the :func:`.command` decorator but the ``cls`` " -"parameter is set to :class:`Group` by default." -msgstr "" - -#: discord.ext.commands.group:6 of -msgid "The ``cls`` parameter can now be passed." -msgstr "" - -#: discord.ext.commands.Command:1 of -msgid "A class that implements the protocol for a bot text command." -msgstr "" - -#: discord.ext.commands.Command:3 of -msgid "" -"These are not created manually, instead they are created via the " -"decorator or functional interface." -msgstr "" - -#: discord.ext.commands.Command:8 of -#, fuzzy -msgid "The name of the command." -msgstr "ギルドの名前。" - -#: discord.ext.commands.Command:14 of -#, fuzzy -msgid "The coroutine that is executed when the command is called." -msgstr "呼び出そうとしたコマンドが無効化されていた際に発生する例外。" - -#: discord.ext.commands.Command:16 of -msgid ":ref:`coroutine `" -msgstr "" - -#: discord.ext.commands.Command:20 of -msgid "The long help text for the command." -msgstr "" - -#: discord.ext.commands.Command:26 of -msgid "The short help text for the command." -msgstr "" - -#: discord.ext.commands.Command:28 discord.ext.commands.Command.cog_name:3 -#: discord.ext.commands.Context:70 discord.ext.commands.Group.cog_name:3 of -msgid "Optional[:class:`str`]" -msgstr "" - -#: discord.ext.commands.Command:32 of -msgid "A replacement for arguments in the default help text." -msgstr "" - -#: discord.ext.commands.Command:38 of -msgid "The list of aliases the command can be invoked under." -msgstr "" - -#: discord.ext.commands.Command:40 of -msgid "Union[List[:class:`str`], Tuple[:class:`str`]]" -msgstr "" - -#: discord.ext.commands.Command:44 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Command:53 of -msgid "" -"The parent command that this command belongs to. ``None`` if there isn't " -"one." -msgstr "" - -#: discord.ext.commands.Command:60 of -msgid "The cog that this command belongs to. ``None`` if there isn't one." -msgstr "" - -#: discord.ext.commands.Command:66 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Command:73 of -msgid "List[Callable[..., :class:`bool`]]" -msgstr "" - -#: discord.ext.commands.Command:77 of -#, fuzzy -msgid "The message prefixed into the default help command." -msgstr ":class:`str` -- この属性に入力されたテキストは、デフォルトのヘルプメッセージの先頭に表示されます。" - -#: discord.ext.commands.Command:83 of -msgid "" -"If ``True``\\, the default help command does not show this in the help " -"output." -msgstr "" - -#: discord.ext.commands.Command:90 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Command:101 of -msgid "The subcommand that was invoked, if any." -msgstr "" - -#: discord.ext.commands.Command:107 of -msgid "" -"If ``True`` and a variadic positional argument is specified, requires the" -" user to specify at least one argument. Defaults to ``False``." -msgstr "" - -#: discord.ext.commands.Command:116 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Command:125 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Command.add_check:1 -#: discord.ext.commands.Group.add_check:1 of -#, fuzzy -msgid "Adds a check to the command." -msgstr "ボットにグローバルチェックを追加します。" - -#: discord.ext.commands.Command.add_check:3 -#: discord.ext.commands.Group.add_check:3 of -#, fuzzy -msgid "This is the non-decorator interface to :func:`.check`." -msgstr "これは:meth:`.check`と:meth:`.check_once`のデコレータでない実装です。" - -#: discord.ext.commands.Command.add_check:7 -#: discord.ext.commands.Group.add_check:7 -#: discord.ext.commands.HelpCommand.add_check:5 of -#, fuzzy -msgid "The function that will be used as a check." -msgstr "グローバルチェックとして使用される関数。" - -#: discord.ext.commands.Command.remove_check:1 -#: discord.ext.commands.Group.remove_check:1 of -msgid "Removes a check from the command." -msgstr "" - -#: discord.ext.commands.Command.remove_check:3 -#: discord.ext.commands.Group.remove_check:3 -#: discord.ext.commands.HelpCommand.remove_check:3 of -msgid "" -"This function is idempotent and will not raise an exception if the " -"function is not in the command's checks." -msgstr "" - -#: discord.ext.commands.Command.remove_check:8 -#: discord.ext.commands.Group.remove_check:8 -#: discord.ext.commands.HelpCommand.remove_check:8 of -msgid "The function to remove from the checks." -msgstr "" - -#: discord.ext.commands.Command.update:1 discord.ext.commands.Group.update:1 of -msgid "Updates :class:`Command` instance with updated attribute." -msgstr "" - -#: discord.ext.commands.Command.update:3 discord.ext.commands.Group.update:3 of -msgid "" -"This works similarly to the :func:`.command` decorator in terms of " -"parameters in that they are passed to the :class:`Command` or subclass " -"constructors, sans the name and callback." -msgstr "" - -#: discord.ext.commands.Command.__call__:3 of -msgid "Calls the internal callback that the command holds." -msgstr "" - -#: discord.ext.commands.Command.__call__:7 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Command.copy:1 of -msgid "Creates a copy of this command." -msgstr "" - -#: discord.ext.commands.Command.copy:3 of -msgid "A new instance of this command." -msgstr "" - -#: discord.ext.commands.Command.copy:4 discord.ext.commands.Context:47 -#: discord.ext.commands.Context:61 of -#, fuzzy -msgid ":class:`Command`" -msgstr ":class:`Command` またはサブクラス" - -#: discord.ext.commands.Command.clean_params:1 -#: discord.ext.commands.Group.clean_params:1 of -msgid "" -"OrderedDict[:class:`str`, :class:`inspect.Parameter`]: Retrieves the " -"parameter OrderedDict without the context or self parameters." -msgstr "" - -#: discord.ext.commands.Command.clean_params:4 -#: discord.ext.commands.Group.clean_params:4 of -msgid "Useful for inspecting signature." -msgstr "" - -#: discord.ext.commands.Command.full_parent_name:1 -#: discord.ext.commands.Group.full_parent_name:1 of -msgid "Retrieves the fully qualified parent command name." -msgstr "" - -#: discord.ext.commands.Command.full_parent_name:3 -#: discord.ext.commands.Group.full_parent_name:3 of -msgid "" -"This the base command name required to execute it. For example, in ``?one" -" two three`` the parent name would be ``one two``." -msgstr "" - -#: discord.ext.commands.Command.parents:1 discord.ext.commands.Group.parents:1 -#: of -msgid "Retrieves the parents of this command." -msgstr "" - -#: discord.ext.commands.Command.parents:3 discord.ext.commands.Group.parents:3 -#: of -msgid "If the command has no parents then it returns an empty :class:`list`." -msgstr "" - -#: discord.ext.commands.Command.parents:5 discord.ext.commands.Group.parents:5 -#: of -msgid "For example in commands ``?a b c test``, the parents are ``[c, b, a]``." -msgstr "" - -#: discord.ext.commands.Command.parents:9 discord.ext.commands.Group.parents:9 -#: discord.ext.commands.HelpCommand.filter_commands:18 of -msgid "List[:class:`Command`]" -msgstr "" - -#: discord.ext.commands.Command.root_parent:1 -#: discord.ext.commands.Group.root_parent:1 of -msgid "Retrieves the root parent of this command." -msgstr "" - -#: discord.ext.commands.Command.root_parent:3 -#: discord.ext.commands.Group.root_parent:3 of -msgid "If the command has no parents then it returns ``None``." -msgstr "" - -#: discord.ext.commands.Command.root_parent:5 -#: discord.ext.commands.Group.root_parent:5 of -msgid "For example in commands ``?a b c test``, the root parent is ``a``." -msgstr "" - -#: discord.ext.commands.Command.qualified_name:1 -#: discord.ext.commands.Group.qualified_name:1 of -msgid "Retrieves the fully qualified command name." -msgstr "" - -#: discord.ext.commands.Command.qualified_name:3 -#: discord.ext.commands.Group.qualified_name:3 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Command.is_on_cooldown:1 -#: discord.ext.commands.Group.is_on_cooldown:1 of -msgid "Checks whether the command is currently on cooldown." -msgstr "" - -#: discord.ext.commands.Command.is_on_cooldown:3 -#: discord.ext.commands.Group.is_on_cooldown:3 of -msgid "The invocation context to use when checking the commands cooldown status." -msgstr "" - -#: discord.ext.commands.Command.is_on_cooldown:6 -#: discord.ext.commands.Group.is_on_cooldown:6 of -msgid "A boolean indicating if the command is on cooldown." -msgstr "" - -#: discord.ext.commands.Command.reset_cooldown:1 -#: discord.ext.commands.Group.reset_cooldown:1 of -msgid "Resets the cooldown on this command." -msgstr "" - -#: discord.ext.commands.Command.reset_cooldown:3 -#: discord.ext.commands.Group.reset_cooldown:3 of -msgid "The invocation context to reset the cooldown under." -msgstr "" - -#: discord.ext.commands.Command.get_cooldown_retry_after:1 -#: discord.ext.commands.Group.get_cooldown_retry_after:1 of -msgid "Retrieves the amount of seconds before this command can be tried again." -msgstr "" - -#: discord.ext.commands.Command.get_cooldown_retry_after:5 -#: discord.ext.commands.Group.get_cooldown_retry_after:5 of -msgid "The invocation context to retrieve the cooldown from." -msgstr "" - -#: discord.ext.commands.Command.get_cooldown_retry_after:8 -#: discord.ext.commands.Group.get_cooldown_retry_after:8 of -msgid "" -"The amount of time left on this command's cooldown in seconds. If this is" -" ``0.0`` then the command isn't on cooldown." -msgstr "" - -#: discord.ext.commands.Command.error:1 discord.ext.commands.Group.error:1 of -msgid "A decorator that registers a coroutine as a local error handler." -msgstr "" - -#: discord.ext.commands.Command.error:3 discord.ext.commands.Group.error:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Command.error:7 discord.ext.commands.Group.error:7 of -msgid "The coroutine to register as the local error handler." -msgstr "" - -#: discord.ext.commands.Command.before_invoke:9 -#: discord.ext.commands.Group.before_invoke:9 of -msgid "See :meth:`.Bot.before_invoke` for more info." -msgstr "" - -#: discord.ext.commands.Command.after_invoke:9 -#: discord.ext.commands.Group.after_invoke:9 of -msgid "See :meth:`.Bot.after_invoke` for more info." -msgstr "" - -#: discord.ext.commands.Command.cog_name:1 -#: discord.ext.commands.Group.cog_name:1 of -msgid "The name of the cog this command belongs to, if any." -msgstr "" - -#: discord.ext.commands.Command.short_doc:1 -#: discord.ext.commands.Group.short_doc:1 of -msgid "Gets the \"short\" documentation of a command." -msgstr "" - -#: discord.ext.commands.Command.short_doc:3 -#: discord.ext.commands.Group.short_doc:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Command.signature:1 -#: discord.ext.commands.Group.signature:1 of -msgid "Returns a POSIX-like signature useful for help command output." -msgstr "" - -#: discord.ext.commands.Command.can_run:3 discord.ext.commands.Group.can_run:3 -#: of -msgid "" -"Checks if the command can be executed by checking all the predicates " -"inside the :attr:`checks` attribute. This also checks whether the command" -" is disabled." -msgstr "" - -#: discord.ext.commands.Command.can_run:7 discord.ext.commands.Group.can_run:7 -#: of -msgid "Checks whether the command is disabled or not" -msgstr "" - -#: discord.ext.commands.Command.can_run:10 -#: discord.ext.commands.Group.can_run:10 of -msgid "The ctx of the command currently being invoked." -msgstr "" - -#: discord.ext.commands.Command.can_run:13 -#: discord.ext.commands.Group.can_run:13 of -msgid "" -"Any command error that was raised during a check call will be propagated" -" by this function." -msgstr "" - -#: discord.ext.commands.Command.can_run:15 -#: discord.ext.commands.Group.can_run:15 of -msgid "A boolean indicating if the command can be invoked." -msgstr "" - -#: discord.ext.commands.Group:1 of -msgid "" -"A class that implements a grouping protocol for commands to be executed " -"as subcommands." -msgstr "" - -#: discord.ext.commands.Group:4 of -msgid "" -"This class is a subclass of :class:`.Command` and thus all options valid " -"in :class:`.Command` are valid in here as well." -msgstr "" - -#: discord.ext.commands.Group:9 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Group:22 of -msgid "" -"Indicates if the group's commands should be case insensitive. Defaults to" -" ``False``." -msgstr "" - -#: discord.ext.commands.Group.copy:1 of -msgid "Creates a copy of this :class:`Group`." -msgstr "" - -#: discord.ext.commands.Group.copy:3 of -msgid "A new instance of this group." -msgstr "" - -#: discord.ext.commands.Group.copy:4 of -#, fuzzy -msgid ":class:`Group`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.GroupMixin:1 of -msgid "" -"A mixin that implements common functionality for classes that behave " -"similar to :class:`.Group` and are allowed to register commands." -msgstr "" - -#: discord.ext.commands.GroupMixin:6 of -msgid "A mapping of command name to :class:`.Command` objects." -msgstr "" - -#: discord.ext.commands.CogMeta:57 discord.ext.commands.Context:35 -#: discord.ext.commands.GroupMixin:9 discord.ext.commands.HelpCommand:40 of -#, fuzzy -msgid ":class:`dict`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.GroupMixin:13 of -msgid "Whether the commands should be case insensitive. Defaults to ``False``." -msgstr "" - -#: ../../ext/commands/api.rst:88 -msgid "Cogs" -msgstr "Cogs" - -#: discord.ext.commands.Cog:1 of -msgid "The base class that all cogs must inherit from." -msgstr "" - -#: discord.ext.commands.Cog:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Cog:7 of -msgid "" -"When inheriting from this class, the options shown in :class:`CogMeta` " -"are equally valid here." -msgstr "" - -#: discord.ext.commands.Cog.get_commands:1 of -msgid "" -"A :class:`list` of :class:`.Command`\\s that are defined inside this cog." -" .. note:: This does not include subcommands." -msgstr "" - -#: discord.ext.commands.Cog.get_commands:1 of -msgid "A :class:`list` of :class:`.Command`\\s that are defined inside this cog." -msgstr "" - -#: discord.ext.commands.Cog.get_commands:6 of -msgid "This does not include subcommands." -msgstr "" - -#: discord.ext.commands.Cog.get_commands:7 of -msgid "List[:class:`.Command`]" -msgstr "" - -#: discord.ext.commands.Cog.qualified_name:1 of -msgid "Returns the cog's specified name, not the class name." -msgstr "" - -#: discord.ext.commands.Cog.description:1 of -msgid "Returns the cog's description, typically the cleaned docstring." -msgstr "" - -#: discord.ext.commands.Cog.walk_commands:1 of -msgid "" -"An iterator that recursively walks through this cog's commands and " -"subcommands." -msgstr "" - -#: discord.ext.commands.Cog.walk_commands:3 of -msgid "" -"Union[:class:`.Command`, :class:`.Group`] -- A command or group from the " -"cog." -msgstr "" - -#: discord.ext.commands.Cog.get_listeners:1 of -msgid "" -"Returns a :class:`list` of (name, function) listener pairs that are " -"defined in this cog." -msgstr "" - -#: discord.ext.commands.Cog.get_listeners:3 of -msgid "The listeners defined in this cog." -msgstr "" - -#: discord.ext.commands.Cog.get_listeners:4 of -msgid "List[Tuple[:class:`str`, :ref:`coroutine `]]" -msgstr "" - -#: discord.ext.commands.Cog.listener:1 of -msgid "A decorator that marks a function as a listener." -msgstr "" - -#: discord.ext.commands.Cog.listener:3 of -msgid "This is the cog equivalent of :meth:`.Bot.listen`." -msgstr "" - -#: discord.ext.commands.Cog.listener:5 of -msgid "" -"The name of the event being listened to. If not provided, it defaults to " -"the function's name." -msgstr "" - -#: discord.ext.commands.Cog.listener:9 of -msgid "" -"The function is not a coroutine function or a string was not passed as" -" the name." -msgstr "" - -#: discord.ext.commands.Cog.cog_unload:1 of -msgid "A special method that is called when the cog gets removed." -msgstr "" - -#: discord.ext.commands.Cog.cog_unload:3 of -msgid "This function **cannot** be a coroutine. It must be a regular function." -msgstr "" - -#: discord.ext.commands.Cog.cog_unload:6 of -msgid "Subclasses must replace this if they want special unloading behaviour." -msgstr "" - -#: discord.ext.commands.Cog.bot_check_once:1 of -msgid "A special method that registers as a :meth:`.Bot.check_once` check." -msgstr "" - -#: discord.ext.commands.Cog.bot_check:4 -#: discord.ext.commands.Cog.bot_check_once:4 -#: discord.ext.commands.Cog.cog_check:4 of -msgid "" -"This function **can** be a coroutine and must take a sole parameter, " -"``ctx``, to represent the :class:`.Context`." -msgstr "" - -#: discord.ext.commands.Cog.bot_check:1 of -msgid "A special method that registers as a :meth:`.Bot.check` check." -msgstr "" - -#: discord.ext.commands.Cog.cog_check:1 of -msgid "" -"A special method that registers as a :func:`commands.check` for every " -"command and subcommand in this cog." -msgstr "" - -#: discord.ext.commands.Cog.cog_command_error:1 of -msgid "" -"A special method that is called whenever an error is dispatched inside " -"this cog." -msgstr "" - -#: discord.ext.commands.Cog.cog_command_error:4 of -msgid "" -"This is similar to :func:`.on_command_error` except only applying to the " -"commands inside this cog." -msgstr "" - -#: discord.ext.commands.Cog.cog_after_invoke:5 -#: discord.ext.commands.Cog.cog_before_invoke:5 -#: discord.ext.commands.Cog.cog_command_error:7 of -msgid "This **must** be a coroutine." -msgstr "" - -#: discord.ext.commands.Cog.cog_command_error:9 of -msgid "The invocation context where the error happened." -msgstr "" - -#: discord.ext.commands.Cog.cog_command_error:11 of -msgid "The error that happened." -msgstr "" - -#: discord.ext.commands.Cog.cog_before_invoke:1 of -msgid "A special method that acts as a cog local pre-invoke hook." -msgstr "" - -#: discord.ext.commands.Cog.cog_before_invoke:3 of -msgid "This is similar to :meth:`.Command.before_invoke`." -msgstr "" - -#: discord.ext.commands.Cog.cog_after_invoke:1 of -msgid "A special method that acts as a cog local post-invoke hook." -msgstr "" - -#: discord.ext.commands.Cog.cog_after_invoke:3 of -msgid "This is similar to :meth:`.Command.after_invoke`." -msgstr "" - -#: discord.ext.commands.CogMeta:1 of -msgid "A metaclass for defining a cog." -msgstr "" - -#: discord.ext.commands.CogMeta:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.CogMeta:7 of -msgid "" -"For example, to create an abstract cog mixin class, the following would " -"be done." -msgstr "" - -#: discord.ext.commands.CogMeta:24 of -msgid "" -"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:" -msgstr "" - -#: discord.ext.commands.CogMeta:35 of -msgid "" -"The cog name. By default, it is the name of the class with no " -"modification." -msgstr "" - -#: discord.ext.commands.CogMeta:41 of -msgid "" -"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:" -msgstr "" - -#: ../../ext/commands/api.rst:99 -msgid "Help Commands" -msgstr "" - -#: discord.ext.commands.HelpCommand:1 of -msgid "The base implementation for help command formatting." -msgstr "" - -#: discord.ext.commands.HelpCommand:5 of -msgid "" -"Internally instances of this class are deep copied every time the command" -" itself is invoked to prevent a race condition mentioned in " -":issue:`2123`." -msgstr "" - -#: discord.ext.commands.HelpCommand:9 of -msgid "" -"This means that relying on the state of this class to be the same between" -" command invocations would not work as expected." -msgstr "" - -#: discord.ext.commands.HelpCommand:14 of -msgid "" -"The context that invoked this help formatter. This is generally set after" -" the help command assigned, :func:`command_callback`\\, has been called." -msgstr "" - -#: discord.ext.commands.HelpCommand:17 of -msgid "Optional[:class:`Context`]" -msgstr "" - -#: discord.ext.commands.HelpCommand:21 of -msgid "" -"Specifies if hidden commands should be shown in the output. Defaults to " -"``False``." -msgstr "" - -#: discord.ext.commands.HelpCommand:28 of -msgid "" -"Specifies if commands should have their :attr:`.Command.checks` called " -"and verified. Defaults to ``True``." -msgstr "" - -#: discord.ext.commands.HelpCommand:35 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.add_check:1 of -#, fuzzy -msgid "Adds a check to the help command." -msgstr "ボットにグローバルチェックを追加します。" - -#: discord.ext.commands.HelpCommand.remove_check:1 of -msgid "Removes a check from the help command." -msgstr "" - -#: discord.ext.commands.HelpCommand.get_bot_mapping:1 of -msgid "Retrieves the bot mapping passed to :meth:`send_bot_help`." -msgstr "" - -#: discord.ext.commands.HelpCommand.clean_prefix:1 of -msgid "" -"The cleaned up invoke prefix. i.e. mentions are ``@name`` instead of " -"``<@id>``." -msgstr "「クリーンアップ」されたプレフィックスを返します。たとえば、メンションは ``<@id>`` のかわりに ``@name`` となります。" - -#: discord.ext.commands.HelpCommand.invoked_with:1 of -msgid "" -"Similar to :attr:`Context.invoked_with` except properly handles the case " -"where :meth:`Context.send_help` is used." -msgstr "" - -#: discord.ext.commands.HelpCommand.invoked_with:4 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.invoked_with:9 of -msgid "The command name that triggered this invocation." -msgstr "" - -#: discord.ext.commands.HelpCommand.get_command_signature:1 -#: discord.ext.commands.MinimalHelpCommand.get_command_signature:1 of -msgid "Retrieves the signature portion of the help page." -msgstr "ヘルプページに表示される、コマンドの使用方法を示す文字列を返します。" - -#: discord.ext.commands.HelpCommand.get_command_signature:3 -#: discord.ext.commands.MinimalHelpCommand.get_command_signature:3 of -msgid "The command to get the signature of." -msgstr "" - -#: discord.ext.commands.HelpCommand.get_command_signature:6 -#: discord.ext.commands.MinimalHelpCommand.get_command_signature:6 of -msgid "The signature for the command." -msgstr "" - -#: discord.ext.commands.HelpCommand.remove_mentions:1 of -msgid "Removes mentions from the string to prevent abuse." -msgstr "" - -#: discord.ext.commands.HelpCommand.remove_mentions:3 of -msgid "This includes ``@everyone``, ``@here``, member mentions and role mentions." -msgstr "" - -#: discord.ext.commands.HelpCommand.remove_mentions:5 of -msgid "The string with mentions removed." -msgstr "" - -#: discord.ext.commands.HelpCommand.cog:1 of -msgid "A property for retrieving or setting the cog for the help command." -msgstr "" - -#: discord.ext.commands.HelpCommand.cog:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.cog:7 of -msgid "To unbind the cog from the help command, you can set it to ``None``." -msgstr "" - -#: discord.ext.commands.HelpCommand.cog:9 of -msgid "The cog that is currently set for the help command." -msgstr "" - -#: discord.ext.commands.HelpCommand.command_not_found:1 -#: discord.ext.commands.HelpCommand.subcommand_not_found:1 of -msgid "|maybecoro|" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_not_found:3 of -msgid "" -"A method called when a command is not found in the help command. This is " -"useful to override for i18n." -msgstr "" - -#: discord.ext.commands.HelpCommand.command_not_found:6 of -msgid "Defaults to ``No command called {0} found.``" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_not_found:8 of -msgid "" -"The string that contains the invalid command. Note that this has had " -"mentions removed to prevent abuse." -msgstr "" - -#: discord.ext.commands.HelpCommand.command_not_found:12 of -msgid "The string to use when a command has not been found." -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:3 of -msgid "" -"A method called when a command did not have a subcommand requested in the" -" help command. This is useful to override for i18n." -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:6 of -msgid "Defaults to either:" -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:8 of -msgid "``'Command \"{command.qualified_name}\" has no subcommands.'``" -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:9 of -msgid "If there is no subcommand in the ``command`` parameter." -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:11 of -msgid "" -"``'Command \"{command.qualified_name}\" has no subcommand named " -"{string}'``" -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:11 of -msgid "If the ``command`` parameter has subcommands but not one named ``string``." -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:13 of -msgid "The command that did not have the subcommand requested." -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:15 of -msgid "" -"The string that contains the invalid subcommand. Note that this has had " -"mentions removed to prevent abuse." -msgstr "" - -#: discord.ext.commands.HelpCommand.subcommand_not_found:19 of -msgid "The string to use when the command did not have the subcommand requested." -msgstr "" - -#: discord.ext.commands.HelpCommand.filter_commands:3 of -msgid "Returns a filtered list of commands and optionally sorts them." -msgstr "" - -#: discord.ext.commands.HelpCommand.filter_commands:5 of -msgid "" -"This takes into account the :attr:`verify_checks` and :attr:`show_hidden`" -" attributes." -msgstr "" - -#: discord.ext.commands.HelpCommand.filter_commands:8 of -msgid "An iterable of commands that are getting filtered." -msgstr "" - -#: discord.ext.commands.HelpCommand.filter_commands:10 of -msgid "Whether to sort the result." -msgstr "" - -#: discord.ext.commands.HelpCommand.filter_commands:12 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.filter_commands:17 of -msgid "A list of commands that passed the filter." -msgstr "" - -#: discord.ext.commands.HelpCommand.get_max_size:1 of -msgid "Returns the largest name length of the specified command list." -msgstr "" - -#: discord.ext.commands.HelpCommand.get_max_size:3 of -msgid "A sequence of commands to check for the largest size." -msgstr "" - -#: discord.ext.commands.HelpCommand.get_max_size:6 of -msgid "The maximum width of the commands." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:12 -#: discord.ext.commands.DefaultHelpCommand:42 -#: discord.ext.commands.HelpCommand.get_max_size:7 -#: discord.ext.commands.MaxConcurrencyReached:9 -#: discord.ext.commands.Paginator:25 of -msgid ":class:`int`" -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.get_destination:1 -#: discord.ext.commands.HelpCommand.get_destination:1 -#: discord.ext.commands.MinimalHelpCommand.get_destination:1 of -msgid "" -"Returns the :class:`~discord.abc.Messageable` where the help command will" -" be output." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.get_destination:3 -#: discord.ext.commands.HelpCommand.get_destination:3 -#: discord.ext.commands.HelpCommand.send_bot_help:11 -#: discord.ext.commands.HelpCommand.send_cog_help:11 -#: discord.ext.commands.HelpCommand.send_command_help:10 -#: discord.ext.commands.HelpCommand.send_error_message:7 -#: discord.ext.commands.HelpCommand.send_group_help:11 -#: discord.ext.commands.MinimalHelpCommand.get_destination:3 of -msgid "You can override this method to customise the behaviour." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.get_destination:5 -#: discord.ext.commands.HelpCommand.get_destination:5 -#: discord.ext.commands.MinimalHelpCommand.get_destination:5 of -msgid "By default this returns the context's channel." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.get_destination:7 -#: discord.ext.commands.HelpCommand.get_destination:7 -#: discord.ext.commands.MinimalHelpCommand.get_destination:7 of -msgid "The destination where the help command will be output." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.get_destination:8 -#: discord.ext.commands.HelpCommand.get_destination:8 -#: discord.ext.commands.MinimalHelpCommand.get_destination:8 of -msgid ":class:`.abc.Messageable`" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_error_message:3 of -msgid "" -"Handles the implementation when an error happens in the help command. For" -" example, the result of :meth:`command_not_found` or " -":meth:`command_has_no_subcommand_found` will be passed here." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_error_message:9 of -msgid "" -"By default, this sends the error message to the destination specified by " -":meth:`get_destination`." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_bot_help:15 -#: discord.ext.commands.HelpCommand.send_cog_help:15 -#: discord.ext.commands.HelpCommand.send_command_help:14 -#: discord.ext.commands.HelpCommand.send_error_message:14 -#: discord.ext.commands.HelpCommand.send_group_help:15 of -msgid "You can access the invocation context with :attr:`HelpCommand.context`." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_error_message:16 of -msgid "" -"The error message to display to the user. Note that this has had mentions" -" removed to prevent abuse." -msgstr "" - -#: discord.ext.commands.HelpCommand.on_help_command_error:3 of -msgid "" -"The help command's error handler, as specified by " -":ref:`ext_commands_error_handler`." -msgstr "" - -#: discord.ext.commands.HelpCommand.on_help_command_error:5 of -msgid "" -"Useful to override if you need some specific behaviour when the error " -"handler is called." -msgstr "" - -#: discord.ext.commands.HelpCommand.on_help_command_error:8 of -msgid "" -"By default this method does nothing and just propagates to the default " -"error handlers." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_bot_help:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_bot_help:6 -#: discord.ext.commands.HelpCommand.send_cog_help:6 -#: discord.ext.commands.HelpCommand.send_command_help:5 -#: discord.ext.commands.HelpCommand.send_group_help:6 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_bot_help:17 of -msgid "" -"Also, the commands in the mapping are not filtered. To do the filtering " -"you will have to call :meth:`filter_commands` yourself." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_bot_help:20 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_cog_help:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_cog_help:17 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_cog_help:21 of -msgid "The cog that was requested for help." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_group_help:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_group_help:17 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_group_help:21 of -msgid "The group that was requested for help." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:3 of -msgid "Handles the implementation of the single command page in the help command." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:16 of -msgid "Showing Help" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:19 of -msgid "" -"There are certain attributes and methods that are helpful for a help " -"command to show such as the following:" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:22 of -msgid ":attr:`Command.help`" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:23 of -msgid ":attr:`Command.brief`" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:24 of -msgid ":attr:`Command.short_doc`" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:25 of -msgid ":attr:`Command.description`" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:26 of -msgid ":meth:`get_command_signature`" -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:28 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.send_command_help:31 of -msgid "The command that was requested for help." -msgstr "" - -#: discord.ext.commands.HelpCommand.prepare_help_command:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.HelpCommand.prepare_help_command:8 -#: discord.ext.commands.MinimalHelpCommand.get_ending_note:3 of -msgid "The default implementation does nothing." -msgstr "" - -#: discord.ext.commands.HelpCommand.prepare_help_command:12 of -msgid "" -"This is called *inside* the help command callback body. So all the usual " -"rules that happen inside apply here as well." -msgstr "" - -#: discord.ext.commands.HelpCommand.prepare_help_command:17 of -msgid "The argument passed to the help command." -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:3 of -msgid "The actual implementation of the help command." -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:5 of -msgid "" -"It is not recommended to override this method and instead change the " -"behaviour through the methods that actually get dispatched." -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:8 of -msgid ":meth:`send_bot_help`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:9 of -msgid ":meth:`send_cog_help`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:10 of -msgid ":meth:`send_group_help`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:11 of -msgid ":meth:`send_command_help`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:12 of -msgid ":meth:`get_destination`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:13 of -msgid ":meth:`command_not_found`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:14 of -msgid ":meth:`subcommand_not_found`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:15 of -msgid ":meth:`send_error_message`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:16 of -msgid ":meth:`on_help_command_error`" -msgstr "" - -#: discord.ext.commands.HelpCommand.command_callback:17 of -msgid ":meth:`prepare_help_command`" -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:1 of -msgid "The implementation of the default help command." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:3 -#: discord.ext.commands.MinimalHelpCommand:3 of -msgid "This inherits from :class:`HelpCommand`." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:5 of -msgid "It extends it with the following attributes." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:9 of -msgid "The maximum number of characters that fit in a line. Defaults to 80." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:16 -#: discord.ext.commands.MinimalHelpCommand:7 of -msgid "" -"Whether to sort the commands in the output alphabetically. Defaults to " -"``True``." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:22 -#: discord.ext.commands.MinimalHelpCommand:27 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:29 -#: discord.ext.commands.MinimalHelpCommand:34 of -msgid "Optional[:class:`bool`]" -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:33 -#: discord.ext.commands.MinimalHelpCommand:38 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:40 of -msgid "How much to indent the commands from a heading. Defaults to ``2``." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:46 of -msgid "" -"The command list's heading string used when the help command is invoked " -"with a category name. Useful for i18n. Defaults to ``\"Commands:\"``" -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:53 -#: discord.ext.commands.MinimalHelpCommand:45 of -msgid "" -"The string used when there is a command which does not belong to any " -"category(cog). Useful for i18n. Defaults to ``\"No Category\"``" -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:60 -#: discord.ext.commands.MinimalHelpCommand:52 of -msgid "The paginator used to paginate the help command output." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand:62 -#: discord.ext.commands.MinimalHelpCommand:54 of -#, fuzzy -msgid ":class:`Paginator`" -msgstr ":class:`.AppInfo`" - -#: discord.ext.commands.DefaultHelpCommand.shorten_text:1 of -#, fuzzy -msgid ":class:`str`: Shortens text to fit into the :attr:`width`." -msgstr "渡された文字列を、 :attr:`width` に収まるよう省略します。" - -#: discord.ext.commands.DefaultHelpCommand.get_ending_note:1 of -#, fuzzy -msgid "" -":class:`str`: Returns help command's ending note. This is mainly useful " -"to override for i18n purposes." -msgstr "Helpコマンドの末尾の文字列を返します。主に翻訳する際にオーバーライドしてください。" - -#: discord.ext.commands.DefaultHelpCommand.add_indented_commands:1 of -msgid "Indents a list of commands after the specified heading." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.add_indented_commands:3 of -msgid "The formatting is added to the :attr:`paginator`." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.add_indented_commands:5 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.add_indented_commands:10 of -msgid "A list of commands to indent for output." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.add_indented_commands:12 of -msgid "" -"The heading to add to the output. This is only added if the list of " -"commands is greater than 0." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.add_indented_commands:15 of -msgid "" -"The max size to use for the gap between indents. If unspecified, calls " -":meth:`get_max_size` on the commands parameter." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.send_pages:1 -#: discord.ext.commands.MinimalHelpCommand.send_pages:1 of -msgid "" -"A helper utility to send the page output from :attr:`paginator` to the " -"destination." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.add_command_formatting:1 of -msgid "" -"A utility function to format the non-indented block of commands and " -"groups." -msgstr "" - -#: discord.ext.commands.DefaultHelpCommand.add_command_formatting:3 -#: discord.ext.commands.MinimalHelpCommand.add_command_formatting:3 of -msgid "The command to format." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand:1 of -msgid "An implementation of a help command with minimal output." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand:13 of -msgid "" -"The command list's heading string used when the help command is invoked " -"with a category name. Useful for i18n. Defaults to ``\"Commands\"``" -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand:20 of -msgid "" -"The alias list's heading string used to list the aliases of the command. " -"Useful for i18n. Defaults to ``\"Aliases:\"``." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.get_opening_note:1 of -msgid "" -"Returns help command's opening note. This is mainly useful to override " -"for i18n purposes." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.get_opening_note:3 of -msgid "The default implementation returns ::" -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.get_opening_note:8 of -msgid "The help command opening note." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.get_ending_note:1 of -msgid "" -"Return the help command's ending note. This is mainly useful to override " -"for i18n purposes." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.get_ending_note:5 of -msgid "The help command ending note." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_bot_commands_formatting:1 of -msgid "Adds the minified bot heading with commands to the output." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_aliases_formatting:3 -#: discord.ext.commands.MinimalHelpCommand.add_bot_commands_formatting:3 -#: discord.ext.commands.MinimalHelpCommand.add_subcommand_formatting:3 of -msgid "The formatting should be added to the :attr:`paginator`." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_bot_commands_formatting:5 of -msgid "" -"The default implementation is a bold underline heading followed by " -"commands separated by an EN SPACE (U+2002) in the next line." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_bot_commands_formatting:8 of -msgid "A list of commands that belong to the heading." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_bot_commands_formatting:10 of -msgid "The heading to add to the line." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_subcommand_formatting:1 of -msgid "Adds formatting information on a subcommand." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_subcommand_formatting:5 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_subcommand_formatting:8 of -msgid "The command to show information of." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_aliases_formatting:1 of -msgid "Adds the formatting information on a command's aliases." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_aliases_formatting:5 of -msgid "" -"The default implementation is the :attr:`aliases_heading` bolded followed" -" by a comma separated list of aliases." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_aliases_formatting:8 of -msgid "This is not called if there are no aliases to format." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_aliases_formatting:10 of -msgid "A list of aliases to format." -msgstr "" - -#: discord.ext.commands.MinimalHelpCommand.add_command_formatting:1 of -msgid "A utility function to format commands and groups." -msgstr "" - -#: discord.ext.commands.Paginator:1 of -msgid "A class that aids in paginating code blocks for Discord messages." -msgstr "" - -#: discord.ext.commands.Paginator:7 of -msgid "Returns the total number of characters in the paginator." -msgstr "" - -#: discord.ext.commands.Paginator:11 of -msgid "The prefix inserted to every page. e.g. three backticks." -msgstr "" - -#: discord.ext.commands.Paginator:17 of -msgid "The suffix appended at the end of every page. e.g. three backticks." -msgstr "" - -#: discord.ext.commands.Paginator:23 of -msgid "The maximum amount of codepoints allowed in a page." -msgstr "" - -#: discord.ext.commands.Paginator.clear:1 of -msgid "Clears the paginator to have no pages." -msgstr "" - -#: discord.ext.commands.Paginator.add_line:1 of -msgid "Adds a line to the current page." -msgstr "" - -#: discord.ext.commands.Paginator.add_line:3 of -msgid "If the line exceeds the :attr:`max_size` then an exception is raised." -msgstr "" - -#: discord.ext.commands.Paginator.add_line:6 of -msgid "The line to add." -msgstr "" - -#: discord.ext.commands.Paginator.add_line:8 of -msgid "Indicates if another empty line should be added." -msgstr "" - -#: discord.ext.commands.Paginator.add_line:11 of -msgid "The line was too big for the current :attr:`max_size`." -msgstr "" - -#: discord.ext.commands.Paginator.close_page:1 of -msgid "Prematurely terminate a page." -msgstr "" - -#: discord.ext.commands.Paginator.pages:1 of -msgid "Returns the rendered list of pages." -msgstr "" - -#: discord.ext.commands.Paginator.pages:3 of -msgid "List[:class:`str`]" -msgstr "" - -#: ../../ext/commands/api.rst:116 -msgid "Enums" -msgstr "" - -#: ../../ext/commands/api.rst:120 -msgid "Specifies a type of bucket for, e.g. a cooldown." -msgstr "" - -#: ../../ext/commands/api.rst:124 -msgid "The default bucket operates on a global basis." -msgstr "" - -#: ../../ext/commands/api.rst:127 -msgid "The user bucket operates on a per-user basis." -msgstr "" - -#: ../../ext/commands/api.rst:130 -msgid "The guild bucket operates on a per-guild basis." -msgstr "" - -#: ../../ext/commands/api.rst:133 -msgid "The channel bucket operates on a per-channel basis." -msgstr "" - -#: ../../ext/commands/api.rst:136 -msgid "The member bucket operates on a per-member basis." -msgstr "" - -#: ../../ext/commands/api.rst:139 -msgid "The category bucket operates on a per-category basis." -msgstr "" - -#: ../../ext/commands/api.rst:142 -msgid "The role bucket operates on a per-role basis." -msgstr "" - -#: ../../ext/commands/api.rst:150 -msgid "Checks" -msgstr "" - -#: discord.ext.commands.check:1 of -msgid "" -"A decorator that adds a check to the :class:`.Command` or its subclasses." -" These checks could be accessed via :attr:`.Command.checks`." -msgstr "" - -#: discord.ext.commands.check:4 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.check:9 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.check:14 of -msgid "" -"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:" -msgstr "" - -#: discord.ext.commands.check:30 of -msgid "" -"The function returned by ``predicate`` is **always** a coroutine, even if" -" the original function was not a coroutine." -msgstr "" - -#: discord.ext.commands.check:33 of -msgid "The ``predicate`` attribute was added." -msgstr "" - -#: discord.ext.commands.check:38 of -msgid "Creating a basic check to see if the command invoker is you." -msgstr "" - -#: discord.ext.commands.check:50 of -msgid "Transforming common checks into its own decorator:" -msgstr "" - -#: discord.ext.commands.check:64 of -msgid "The predicate to check if the command should be invoked." -msgstr "" - -#: discord.ext.commands.check_any:1 of -msgid "" -"A :func:`check` that is added that checks if any of the checks passed " -"will pass, i.e. using logical OR." -msgstr "" - -#: discord.ext.commands.check_any:4 of -msgid "" -"If all checks fail then :exc:`.CheckAnyFailure` is raised to signal the " -"failure. It inherits from :exc:`.CheckFailure`." -msgstr "" - -#: discord.ext.commands.check_any:9 of -msgid "The ``predicate`` attribute for this function **is** a coroutine." -msgstr "" - -#: discord.ext.commands.check_any:13 of -msgid "" -"An argument list of checks that have been decorated with the " -":func:`check` decorator." -msgstr "" - -#: discord.ext.commands.check_any:17 of -msgid "" -"A check passed has not been decorated with the :func:`check` " -"decorator." -msgstr "" - -#: discord.ext.commands.check_any:21 of -msgid "Creating a basic check to see if it's the bot owner or the server owner:" -msgstr "" - -#: discord.ext.commands.has_role:1 of -msgid "" -"A :func:`.check` that is added that checks if the member invoking the " -"command has the role specified via the name or ID specified." -msgstr "" - -#: discord.ext.commands.has_role:4 of -msgid "" -"If a string is specified, you must give the exact name of the role, " -"including caps and spelling." -msgstr "" - -#: discord.ext.commands.has_role:7 of -msgid "" -"If an integer is specified, you must give the exact snowflake ID of the " -"role." -msgstr "" - -#: discord.ext.commands.has_role:9 of -msgid "" -"If the message is invoked in a private message context then the check " -"will return ``False``." -msgstr "" - -#: discord.ext.commands.has_role:12 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.has_role:18 of -msgid "" -"Raise :exc:`.MissingRole` or :exc:`.NoPrivateMessage` instead of generic " -":exc:`.CheckFailure`" -msgstr "" - -#: discord.ext.commands.has_role:21 of -msgid "The name or ID of the role to check." -msgstr "" - -#: discord.ext.commands.has_permissions:1 of -msgid "" -"A :func:`.check` that is added that checks if the member has all of the " -"permissions necessary." -msgstr "" - -#: discord.ext.commands.has_permissions:4 of -msgid "" -"Note that this check operates on the current channel permissions, not the" -" guild wide permissions." -msgstr "" - -#: discord.ext.commands.has_permissions:7 of -msgid "" -"The permissions passed in must be exactly like the properties shown under" -" :class:`.discord.Permissions`." -msgstr "" - -#: discord.ext.commands.has_permissions:10 of -msgid "" -"This check raises a special exception, :exc:`.MissingPermissions` that is" -" inherited from :exc:`.CheckFailure`." -msgstr "" - -#: discord.ext.commands.has_permissions:13 of -msgid "An argument list of permissions to check for." -msgstr "" - -#: discord.ext.commands.has_guild_permissions:1 of -msgid "" -"Similar to :func:`.has_permissions`, but operates on guild wide " -"permissions instead of the current channel permissions." -msgstr "" - -#: discord.ext.commands.has_guild_permissions:4 of -msgid "" -"If this check is called in a DM context, it will raise an exception, " -":exc:`.NoPrivateMessage`." -msgstr "" - -#: discord.ext.commands.has_any_role:1 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.has_any_role:5 of -msgid "Similar to :func:`.has_role`\\, the names or IDs passed in must be exact." -msgstr "" - -#: discord.ext.commands.has_any_role:7 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.has_any_role:13 of -msgid "" -"Raise :exc:`.MissingAnyRole` or :exc:`.NoPrivateMessage` instead of " -"generic :exc:`.CheckFailure`" -msgstr "" - -#: discord.ext.commands.has_any_role:16 of -msgid "An argument list of names or IDs to check that the member has roles wise." -msgstr "" - -#: discord.ext.commands.bot_has_role:1 of -msgid "Similar to :func:`.has_role` except checks if the bot itself has the role." -msgstr "" - -#: discord.ext.commands.bot_has_role:4 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.bot_has_role:10 of -msgid "" -"Raise :exc:`.BotMissingRole` or :exc:`.NoPrivateMessage` instead of " -"generic :exc:`.CheckFailure`" -msgstr "" - -#: discord.ext.commands.bot_has_permissions:1 of -msgid "" -"Similar to :func:`.has_permissions` except checks if the bot itself has " -"the permissions listed." -msgstr "" - -#: discord.ext.commands.bot_has_permissions:4 of -msgid "" -"This check raises a special exception, :exc:`.BotMissingPermissions` that" -" is inherited from :exc:`.CheckFailure`." -msgstr "" - -#: discord.ext.commands.bot_has_guild_permissions:1 of -msgid "" -"Similar to :func:`.has_guild_permissions`, but checks the bot members " -"guild permissions." -msgstr "" - -#: discord.ext.commands.bot_has_any_role:1 of -msgid "" -"Similar to :func:`.has_any_role` except checks if the bot itself has any " -"of the roles listed." -msgstr "" - -#: discord.ext.commands.bot_has_any_role:4 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.bot_has_any_role:10 of -msgid "" -"Raise :exc:`.BotMissingAnyRole` or :exc:`.NoPrivateMessage` instead of " -"generic checkfailure" -msgstr "" - -#: discord.ext.commands.cooldown:1 of -#, fuzzy -msgid "A decorator that adds a cooldown to a :class:`.Command`" -msgstr "Botにグローバルチェックを追加するデコレーター" - -#: discord.ext.commands.cooldown:3 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.cooldown:9 of -msgid "" -"If a cooldown is triggered, then :exc:`.CommandOnCooldown` is triggered " -"in :func:`.on_command_error` and the local error handler." -msgstr "" - -#: discord.ext.commands.cooldown:12 of -msgid "A command can only have a single cooldown." -msgstr "" - -#: discord.ext.commands.cooldown:14 of -msgid "The number of times a command can be used before triggering a cooldown." -msgstr "" - -#: discord.ext.commands.cooldown:16 of -msgid "The amount of seconds to wait for a cooldown when it's been triggered." -msgstr "" - -#: discord.ext.commands.cooldown:18 of -msgid "The type of cooldown to have." -msgstr "" - -#: discord.ext.commands.max_concurrency:1 of -msgid "" -"A decorator that adds a maximum concurrency to a :class:`.Command` or its" -" subclasses." -msgstr "" - -#: discord.ext.commands.max_concurrency:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.max_concurrency:10 of -msgid "" -"The maximum number of invocations of this command that can be running at " -"the same time." -msgstr "" - -#: discord.ext.commands.max_concurrency:12 of -msgid "" -"The bucket that this concurrency is based on, e.g. ``BucketType.guild`` " -"would allow it to be used up to ``number`` times per guild." -msgstr "" - -#: discord.ext.commands.max_concurrency:15 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.before_invoke:3 of -msgid "" -"This allows you to refer to one before invoke hook for several commands " -"that do not have to be within the same cog." -msgstr "" - -#: discord.ext.commands.after_invoke:3 of -msgid "" -"This allows you to refer to one after invoke hook for several commands " -"that do not have to be within the same cog." -msgstr "" - -#: discord.ext.commands.guild_only:1 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.guild_only:5 of -msgid "" -"This check raises a special exception, :exc:`.NoPrivateMessage` that is " -"inherited from :exc:`.CheckFailure`." -msgstr "" - -#: discord.ext.commands.dm_only:1 of -msgid "" -"A :func:`.check` that indicates this command must only be used in a DM " -"context. Only private messages are allowed when using the command." -msgstr "" - -#: discord.ext.commands.dm_only:5 of -msgid "" -"This check raises a special exception, :exc:`.PrivateMessageOnly` that is" -" inherited from :exc:`.CheckFailure`." -msgstr "" - -#: discord.ext.commands.is_owner:1 of -msgid "" -"A :func:`.check` that checks if the person invoking this command is the " -"owner of the bot." -msgstr "" - -#: discord.ext.commands.is_owner:4 of -msgid "This is powered by :meth:`.Bot.is_owner`." -msgstr "" - -#: discord.ext.commands.is_owner:6 of -msgid "" -"This check raises a special exception, :exc:`.NotOwner` that is derived " -"from :exc:`.CheckFailure`." -msgstr "" - -#: discord.ext.commands.is_nsfw:1 of -msgid "A :func:`.check` that checks if the channel is a NSFW channel." -msgstr "" - -#: discord.ext.commands.is_nsfw:3 of -msgid "" -"This check raises a special exception, :exc:`.NSFWChannelRequired` that " -"is derived from :exc:`.CheckFailure`." -msgstr "" - -#: discord.ext.commands.is_nsfw:8 of -msgid "" -"Raise :exc:`.NSFWChannelRequired` instead of generic " -":exc:`.CheckFailure`. DM channels will also now pass this check." -msgstr "" - -#: ../../ext/commands/api.rst:191 -msgid "Context" -msgstr "" - -#: discord.ext.commands.Context:1 of -msgid "Represents the context in which a command is being invoked under." -msgstr "" - -#: discord.ext.commands.Context:3 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context:7 of -msgid "This class implements the :class:`~discord.abc.Messageable` ABC." -msgstr "" - -#: discord.ext.commands.Context:11 of -msgid "The message that triggered the command being executed." -msgstr "" - -#: discord.ext.commands.Context:13 of -#, fuzzy -msgid ":class:`.Message`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Context:17 of -msgid "The bot that contains the command being executed." -msgstr "" - -#: discord.ext.commands.Context:19 of -#, fuzzy -msgid ":class:`.Bot`" -msgstr ":class:`.AppInfo`" - -#: discord.ext.commands.Context:23 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.BotMissingPermissions:10 -#: discord.ext.commands.Context:27 discord.ext.commands.MissingPermissions:10 -#: of -#, fuzzy -msgid ":class:`list`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.Context:31 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context:39 of -msgid "The prefix that was used to invoke the command." -msgstr "" - -#: discord.ext.commands.Context:45 of -msgid "The command that is being invoked currently." -msgstr "" - -#: discord.ext.commands.Context:51 of -msgid "" -"The command name that triggered this invocation. Useful for finding out " -"which alias called the command." -msgstr "" - -#: discord.ext.commands.Context:58 of -msgid "" -"The subcommand that was invoked. If no valid subcommand was invoked then " -"this is equal to ``None``." -msgstr "" - -#: discord.ext.commands.Context:65 of -msgid "" -"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``." -msgstr "" - -#: discord.ext.commands.Context:74 of -msgid "" -"A boolean that indicates if the command failed to be parsed, checked, or " -"invoked." -msgstr "" - -#: discord.ext.commands.Context.history:1 of -msgid "" -"Returns an :class:`~discord.AsyncIterator` that enables receiving the " -"destination's message history." -msgstr "" - -#: discord.ext.commands.Context.history:3 of -#, fuzzy -msgid "" -"You must have :attr:`~Permissions.read_message_history` permissions to " -"use this." -msgstr "これを行うには、関連付けられたGuildにて、 :attr:`~.Permissions.manage_channels` 権限が必要です。" - -#: discord.ext.commands.Context.history:14 of -msgid "Flattening into a list: ::" -msgstr "" - -#: discord.ext.commands.Context.history:21 of -msgid "" -"The number of messages to retrieve. If ``None``, retrieves every message " -"in the channel. Note, however, that this would make it a slow operation." -msgstr "" - -#: discord.ext.commands.Context.history:25 of -msgid "" -"Retrieve messages before this date or message. If a date is provided it " -"must be a timezone-naive datetime representing UTC time." -msgstr "" - -#: discord.ext.commands.Context.history:28 of -msgid "" -"Retrieve messages after this date or message. If a date is provided it " -"must be a timezone-naive datetime representing UTC time." -msgstr "" - -#: discord.ext.commands.Context.history:31 of -msgid "" -"Retrieve messages around this date or message. If a date is provided it " -"must be a timezone-naive datetime representing UTC 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." -msgstr "" - -#: discord.ext.commands.Context.history:36 of -msgid "" -"If set to ``True``, return messages in oldest->newest order. Defaults to " -"``True`` if ``after`` is specified, otherwise ``False``." -msgstr "" - -#: discord.ext.commands.Context.history:40 of -#, fuzzy -msgid "You do not have permissions to get channel message history." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.ext.commands.Context.history:41 of -msgid "The request to get message history failed." -msgstr "" - -#: discord.ext.commands.Context.history:43 of -msgid ":class:`~discord.Message` -- The message with the message data parsed." -msgstr "" - -#: discord.ext.commands.Context.typing:1 of -msgid "" -"Returns a context manager that allows you to type for an indefinite " -"period of time." -msgstr "" - -#: discord.ext.commands.Context.typing:3 of -msgid "This is useful for denoting long computations in your bot." -msgstr "" - -#: discord.ext.commands.Context.typing:7 of -msgid "" -"This is both a regular context manager and an async context manager. This" -" means that both ``with`` and ``async with`` work with this." -msgstr "" - -#: discord.ext.commands.Context.typing:10 of -msgid "Example Usage: ::" -msgstr "" - -#: discord.ext.commands.Context.invoke:3 of -msgid "Calls a command with the arguments given." -msgstr "" - -#: discord.ext.commands.Context.invoke:5 of -msgid "" -"This is useful if you want to just call the callback that a " -":class:`.Command` holds internally." -msgstr "" - -#: discord.ext.commands.Context.invoke:10 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context.invoke:14 of -msgid "" -"You must take care in passing the proper arguments when using this " -"function." -msgstr "" - -#: discord.ext.commands.Context.invoke:19 of -msgid "The first parameter passed **must** be the command being invoked." -msgstr "" - -#: discord.ext.commands.Context.invoke:21 of -msgid "The command that is going to be called." -msgstr "" - -#: discord.ext.commands.Context.invoke:23 of -msgid "The arguments to to use." -msgstr "" - -#: discord.ext.commands.Context.invoke:24 of -msgid "The keyword arguments to use." -msgstr "" - -#: discord.ext.commands.Context.invoke:26 of -msgid "The command argument to invoke is missing." -msgstr "" - -#: discord.ext.commands.Context.reinvoke:3 of -msgid "Calls the command again." -msgstr "" - -#: discord.ext.commands.Context.reinvoke:5 of -msgid "" -"This is similar to :meth:`~.Context.invoke` except that it bypasses " -"checks, cooldowns, and error handlers." -msgstr "" - -#: discord.ext.commands.Context.reinvoke:10 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context.reinvoke:16 of -msgid "Whether to call the before and after invoke hooks." -msgstr "" - -#: discord.ext.commands.Context.reinvoke:18 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context.reinvoke:23 of -msgid "The context to reinvoke is not valid." -msgstr "" - -#: discord.ext.commands.Context.valid:1 of -msgid "Checks if the invocation context is valid to be invoked with." -msgstr "" - -#: discord.ext.commands.Context.cog:1 of -msgid "" -"Returns the cog associated with this context's command. None if it does " -"not exist." -msgstr "" - -#: discord.ext.commands.Context.cog:3 of -#, fuzzy -msgid ":class:`.Cog`" -msgstr ":class:`.AppInfo`" - -#: discord.ext.commands.Context.guild:1 of -msgid "" -"Returns the guild associated with this context's command. None if not " -"available." -msgstr "" - -#: discord.ext.commands.Context.channel:1 of -msgid "" -":class:`.TextChannel`: Returns the channel associated with this context's" -" command. Shorthand for :attr:`.Message.channel`." -msgstr "" - -#: discord.ext.commands.Context.author:1 of -msgid "" -"Union[:class:`~discord.User`, :class:`.Member`]: Returns the author " -"associated with this context's command. Shorthand for " -":attr:`.Message.author`" -msgstr "" - -#: discord.ext.commands.Context.me:1 of -msgid "" -"Union[:class:`.Member`, :class:`.ClientUser`]: Similar to " -":attr:`.Guild.me` except it may return the :class:`.ClientUser` in " -"private message contexts." -msgstr "" - -#: discord.ext.commands.Context.voice_client:1 of -msgid "A shortcut to :attr:`.Guild.voice_client`\\, if applicable." -msgstr "" - -#: discord.ext.commands.Context.voice_client:3 of -msgid "Optional[:class:`.VoiceProtocol`]" -msgstr "" - -#: discord.ext.commands.Context.send_help:3 of -msgid "" -"Shows the help command for the specified entity if given. The entity can " -"be a command or a cog." -msgstr "" - -#: discord.ext.commands.Context.send_help:6 of -msgid "If no entity is given, then it'll show help for the entire bot." -msgstr "" - -#: discord.ext.commands.Context.send_help:9 of -msgid "" -"If the entity is a string, then it looks up whether it's a :class:`Cog` " -"or a :class:`Command`." -msgstr "" - -#: discord.ext.commands.Context.send_help:14 of -msgid "" -"Due to the way this function works, instead of returning something " -"similar to :meth:`~.commands.HelpCommand.command_not_found` this returns " -":class:`None` on bad input or no help command." -msgstr "" - -#: discord.ext.commands.Context.send_help:18 of -msgid "The entity to show help for." -msgstr "" - -#: discord.ext.commands.Context.send_help:21 of -msgid "The result of the help command, if any." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:3 of -msgid "Retrieves a single :class:`~discord.Message` from the destination." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:5 of -msgid "This can only be used by bot accounts." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:7 of -msgid "The message ID to look for." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:10 of -msgid "The specified message was not found." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:11 of -msgid "You do not have the permissions required to get a message." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:12 of -msgid "Retrieving the message failed." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:14 of -msgid "The message asked for." -msgstr "" - -#: discord.ext.commands.Context.fetch_message:15 -#: discord.ext.commands.Context.send:49 of -msgid ":class:`~discord.Message`" -msgstr "" - -#: discord.ext.commands.Context.pins:3 of -msgid "Retrieves all messages that are currently pinned in the channel." -msgstr "" - -#: discord.ext.commands.Context.pins:7 of -msgid "" -"Due to a limitation with the Discord API, the :class:`.Message` objects " -"returned by this method do not contain complete " -":attr:`.Message.reactions` data." -msgstr "" - -#: discord.ext.commands.Context.pins:11 of -msgid "Retrieving the pinned messages failed." -msgstr "" - -#: discord.ext.commands.Context.pins:13 of -msgid "The messages that are currently pinned." -msgstr "" - -#: discord.ext.commands.Context.pins:14 of -msgid "List[:class:`~discord.Message`]" -msgstr "" - -#: discord.ext.commands.Context.send:3 of -msgid "Sends a message to the destination with the content given." -msgstr "" - -#: discord.ext.commands.Context.send:5 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context.send:9 of -msgid "" -"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**." -msgstr "" - -#: discord.ext.commands.Context.send:14 of -msgid "" -"If the ``embed`` parameter is provided, it must be of type " -":class:`~discord.Embed` and it must be a rich embed type." -msgstr "" - -#: discord.ext.commands.Context.send:17 of -msgid "The content of the message to send." -msgstr "" - -#: discord.ext.commands.Context.send:19 of -msgid "Indicates if the message should be sent using text-to-speech." -msgstr "" - -#: discord.ext.commands.Context.send:21 of -msgid "The rich embed for the content." -msgstr "" - -#: discord.ext.commands.Context.send:23 of -msgid "The file to upload." -msgstr "" - -#: discord.ext.commands.Context.send:25 of -msgid "A list of files to upload. Must be a maximum of 10." -msgstr "" - -#: discord.ext.commands.Context.send:27 of -msgid "" -"The nonce to use for sending this message. If the message was " -"successfully sent, then the message will have a nonce with this value." -msgstr "" - -#: discord.ext.commands.Context.send:30 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context.send:34 of -msgid "" -"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. .. versionadded:: 1.4" -msgstr "" - -#: discord.ext.commands.Context.send:34 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.Context.send:44 of -msgid "Sending the message failed." -msgstr "" - -#: discord.ext.commands.Context.send:45 of -msgid "You do not have the proper permissions to send the message." -msgstr "" - -#: discord.ext.commands.Context.send:46 of -msgid "" -"The ``files`` list is not of the appropriate size or you specified " -"both ``file`` and ``files``." -msgstr "" - -#: discord.ext.commands.Context.send:48 of -msgid "The message that was sent." -msgstr "" - -#: discord.ext.commands.Context.trigger_typing:3 of -msgid "Triggers a *typing* indicator to the destination." -msgstr "" - -#: discord.ext.commands.Context.trigger_typing:5 of -msgid "" -"*Typing* indicator will go away after 10 seconds, or after a message is " -"sent." -msgstr "" - -#: ../../ext/commands/api.rst:207 -msgid "Converters" -msgstr "" - -#: discord.ext.commands.Converter:1 of -msgid "" -"The base class of custom converters that require the :class:`.Context` to" -" be passed to be useful." -msgstr "" - -#: discord.ext.commands.Converter:4 of -msgid "" -"This allows you to implement converters that function similar to the " -"special cased ``discord`` classes." -msgstr "" - -#: discord.ext.commands.Converter:7 of -msgid "" -"Classes that derive from this should override the " -":meth:`~.Converter.convert` method to do its conversion logic. This " -"method must be a :ref:`coroutine `." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter.convert:3 -#: discord.ext.commands.ColourConverter.convert:3 -#: discord.ext.commands.Converter.convert:3 -#: discord.ext.commands.EmojiConverter.convert:3 -#: discord.ext.commands.GameConverter.convert:3 -#: discord.ext.commands.InviteConverter.convert:3 -#: discord.ext.commands.MemberConverter.convert:3 -#: discord.ext.commands.MessageConverter.convert:3 -#: discord.ext.commands.PartialEmojiConverter.convert:3 -#: discord.ext.commands.RoleConverter.convert:3 -#: discord.ext.commands.TextChannelConverter.convert:3 -#: discord.ext.commands.UserConverter.convert:3 -#: discord.ext.commands.VoiceChannelConverter.convert:3 -#: discord.ext.commands.clean_content.convert:3 of -msgid "The method to override to do conversion logic." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter.convert:5 -#: discord.ext.commands.ColourConverter.convert:5 -#: discord.ext.commands.Converter.convert:5 -#: discord.ext.commands.EmojiConverter.convert:5 -#: discord.ext.commands.GameConverter.convert:5 -#: discord.ext.commands.InviteConverter.convert:5 -#: discord.ext.commands.MemberConverter.convert:5 -#: discord.ext.commands.MessageConverter.convert:5 -#: discord.ext.commands.PartialEmojiConverter.convert:5 -#: discord.ext.commands.RoleConverter.convert:5 -#: discord.ext.commands.TextChannelConverter.convert:5 -#: discord.ext.commands.UserConverter.convert:5 -#: discord.ext.commands.VoiceChannelConverter.convert:5 -#: discord.ext.commands.clean_content.convert:5 of -msgid "" -"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." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter.convert:9 -#: discord.ext.commands.ColourConverter.convert:9 -#: discord.ext.commands.Converter.convert:9 -#: discord.ext.commands.EmojiConverter.convert:9 -#: discord.ext.commands.GameConverter.convert:9 -#: discord.ext.commands.InviteConverter.convert:9 -#: discord.ext.commands.MemberConverter.convert:9 -#: discord.ext.commands.MessageConverter.convert:9 -#: discord.ext.commands.PartialEmojiConverter.convert:9 -#: discord.ext.commands.RoleConverter.convert:9 -#: discord.ext.commands.TextChannelConverter.convert:9 -#: discord.ext.commands.UserConverter.convert:9 -#: discord.ext.commands.VoiceChannelConverter.convert:9 -#: discord.ext.commands.clean_content.convert:9 of -msgid "The invocation context that the argument is being used in." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter.convert:11 -#: discord.ext.commands.ColourConverter.convert:11 -#: discord.ext.commands.Converter.convert:11 -#: discord.ext.commands.EmojiConverter.convert:11 -#: discord.ext.commands.GameConverter.convert:11 -#: discord.ext.commands.InviteConverter.convert:11 -#: discord.ext.commands.MemberConverter.convert:11 -#: discord.ext.commands.MessageConverter.convert:11 -#: discord.ext.commands.PartialEmojiConverter.convert:11 -#: discord.ext.commands.RoleConverter.convert:11 -#: discord.ext.commands.TextChannelConverter.convert:11 -#: discord.ext.commands.UserConverter.convert:11 -#: discord.ext.commands.VoiceChannelConverter.convert:11 -#: discord.ext.commands.clean_content.convert:11 of -msgid "The argument that is being converted." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter.convert:14 -#: discord.ext.commands.ColourConverter.convert:14 -#: discord.ext.commands.Converter.convert:14 -#: discord.ext.commands.EmojiConverter.convert:14 -#: discord.ext.commands.GameConverter.convert:14 -#: discord.ext.commands.InviteConverter.convert:14 -#: discord.ext.commands.MemberConverter.convert:14 -#: discord.ext.commands.MessageConverter.convert:14 -#: discord.ext.commands.PartialEmojiConverter.convert:14 -#: discord.ext.commands.RoleConverter.convert:14 -#: discord.ext.commands.TextChannelConverter.convert:14 -#: discord.ext.commands.UserConverter.convert:14 -#: discord.ext.commands.VoiceChannelConverter.convert:14 -#: discord.ext.commands.clean_content.convert:14 of -msgid "A generic exception occurred when converting the argument." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter.convert:15 -#: discord.ext.commands.ColourConverter.convert:15 -#: discord.ext.commands.Converter.convert:15 -#: discord.ext.commands.EmojiConverter.convert:15 -#: discord.ext.commands.GameConverter.convert:15 -#: discord.ext.commands.InviteConverter.convert:15 -#: discord.ext.commands.MemberConverter.convert:15 -#: discord.ext.commands.MessageConverter.convert:15 -#: discord.ext.commands.PartialEmojiConverter.convert:15 -#: discord.ext.commands.RoleConverter.convert:15 -#: discord.ext.commands.TextChannelConverter.convert:15 -#: discord.ext.commands.UserConverter.convert:15 -#: discord.ext.commands.VoiceChannelConverter.convert:15 -#: discord.ext.commands.clean_content.convert:15 of -msgid "The converter failed to convert the argument." -msgstr "" - -#: discord.ext.commands.MemberConverter:1 of -msgid "Converts to a :class:`~discord.Member`." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter:3 -#: discord.ext.commands.MemberConverter:3 discord.ext.commands.RoleConverter:3 -#: discord.ext.commands.TextChannelConverter:3 -#: discord.ext.commands.VoiceChannelConverter:3 of -msgid "" -"All lookups are via the local guild. If in a DM context, then the lookup " -"is done by the global cache." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter:6 -#: discord.ext.commands.EmojiConverter:6 discord.ext.commands.MemberConverter:6 -#: discord.ext.commands.MessageConverter:5 discord.ext.commands.RoleConverter:6 -#: discord.ext.commands.TextChannelConverter:6 -#: discord.ext.commands.UserConverter:5 -#: discord.ext.commands.VoiceChannelConverter:6 of -msgid "The lookup strategy is as follows (in order):" -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter:8 -#: discord.ext.commands.EmojiConverter:8 discord.ext.commands.MemberConverter:8 -#: discord.ext.commands.RoleConverter:8 -#: discord.ext.commands.TextChannelConverter:8 -#: discord.ext.commands.UserConverter:7 -#: discord.ext.commands.VoiceChannelConverter:8 of -msgid "Lookup by ID." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter:9 -#: discord.ext.commands.MemberConverter:9 discord.ext.commands.RoleConverter:9 -#: discord.ext.commands.TextChannelConverter:9 -#: discord.ext.commands.UserConverter:8 -#: discord.ext.commands.VoiceChannelConverter:9 of -msgid "Lookup by mention." -msgstr "" - -#: discord.ext.commands.MemberConverter:10 discord.ext.commands.UserConverter:9 -#: of -msgid "Lookup by name#discrim" -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter:10 -#: discord.ext.commands.EmojiConverter:10 -#: discord.ext.commands.MemberConverter:11 -#: discord.ext.commands.RoleConverter:10 -#: discord.ext.commands.TextChannelConverter:10 -#: discord.ext.commands.UserConverter:10 -#: discord.ext.commands.VoiceChannelConverter:10 of -msgid "Lookup by name" -msgstr "" - -#: discord.ext.commands.MemberConverter:12 of -msgid "Lookup by nickname" -msgstr "" - -#: discord.ext.commands.MemberConverter:14 of -msgid "Raise :exc:`.MemberNotFound` instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.MemberConverter:17 of -msgid "" -"This converter now lazily fetches members from the gateway and HTTP APIs," -" optionally caching the result if :attr:`.MemberCacheFlags.joined` is " -"enabled." -msgstr "" - -#: discord.ext.commands.UserConverter:1 of -msgid "Converts to a :class:`~discord.User`." -msgstr "" - -#: discord.ext.commands.UserConverter:3 of -msgid "All lookups are via the global user cache." -msgstr "" - -#: discord.ext.commands.UserConverter:12 of -msgid "Raise :exc:`.UserNotFound` instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.MessageConverter:1 of -msgid "Converts to a :class:`discord.Message`." -msgstr "" - -#: discord.ext.commands.MessageConverter:7 of -msgid "" -"Lookup by \"{channel ID}-{message ID}\" (retrieved by shift-clicking on " -"\"Copy ID\")" -msgstr "" - -#: discord.ext.commands.MessageConverter:8 of -msgid "Lookup by message ID (the message **must** be in the context channel)" -msgstr "" - -#: discord.ext.commands.MessageConverter:9 of -msgid "Lookup by message URL" -msgstr "" - -#: discord.ext.commands.MessageConverter:11 of -msgid "" -"Raise :exc:`.ChannelNotFound`, `MessageNotFound` or `ChannelNotReadable` " -"instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.TextChannelConverter:1 of -msgid "Converts to a :class:`~discord.TextChannel`." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter:12 -#: discord.ext.commands.TextChannelConverter:12 -#: discord.ext.commands.VoiceChannelConverter:12 of -msgid "Raise :exc:`.ChannelNotFound` instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.VoiceChannelConverter:1 of -msgid "Converts to a :class:`~discord.VoiceChannel`." -msgstr "" - -#: discord.ext.commands.CategoryChannelConverter:1 of -msgid "Converts to a :class:`~discord.CategoryChannel`." -msgstr "" - -#: discord.ext.commands.InviteConverter:1 of -msgid "Converts to a :class:`~discord.Invite`." -msgstr "" - -#: discord.ext.commands.InviteConverter:3 of -msgid "This is done via an HTTP request using :meth:`.Bot.fetch_invite`." -msgstr "" - -#: discord.ext.commands.InviteConverter:5 of -msgid "Raise :exc:`.BadInviteArgument` instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.RoleConverter:1 of -msgid "Converts to a :class:`~discord.Role`." -msgstr "" - -#: discord.ext.commands.RoleConverter:12 of -msgid "Raise :exc:`.RoleNotFound` instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.GameConverter:1 of -msgid "Converts to :class:`~discord.Game`." -msgstr "" - -#: discord.ext.commands.ColourConverter:1 of -msgid "Converts to a :class:`~discord.Colour`." -msgstr "" - -#: discord.ext.commands.ColourConverter:3 of -msgid "Add an alias named ColorConverter" -msgstr "" - -#: discord.ext.commands.ColourConverter:6 of -msgid "The following formats are accepted:" -msgstr "" - -#: discord.ext.commands.ColourConverter:8 of -msgid "``0x``" -msgstr "" - -#: discord.ext.commands.ColourConverter:9 of -msgid "``#``" -msgstr "" - -#: discord.ext.commands.ColourConverter:10 of -msgid "``0x#``" -msgstr "" - -#: discord.ext.commands.ColourConverter:11 of -msgid "Any of the ``classmethod`` in :class:`Colour`" -msgstr "" - -#: discord.ext.commands.ColourConverter:13 of -msgid "The ``_`` in the name can be optionally replaced with spaces." -msgstr "" - -#: discord.ext.commands.ColourConverter:15 of -msgid "Raise :exc:`.BadColourArgument` instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.EmojiConverter:1 of -msgid "Converts to a :class:`~discord.Emoji`." -msgstr "" - -#: discord.ext.commands.EmojiConverter:3 of -msgid "" -"All lookups are done for the local guild first, if available. If that " -"lookup fails, then it checks the client's global cache." -msgstr "" - -#: discord.ext.commands.EmojiConverter:9 of -msgid "Lookup by extracting ID from the emoji." -msgstr "" - -#: discord.ext.commands.EmojiConverter:12 of -msgid "Raise :exc:`.EmojiNotFound` instead of generic :exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.PartialEmojiConverter:1 of -msgid "Converts to a :class:`~discord.PartialEmoji`." -msgstr "" - -#: discord.ext.commands.PartialEmojiConverter:3 of -msgid "This is done by extracting the animated flag, name and ID from the emoji." -msgstr "" - -#: discord.ext.commands.PartialEmojiConverter:5 of -msgid "" -"Raise :exc:`.PartialEmojiConversionFailure` instead of generic " -":exc:`.BadArgument`" -msgstr "" - -#: discord.ext.commands.clean_content:1 of -msgid "Converts the argument to mention scrubbed version of said content." -msgstr "" - -#: discord.ext.commands.clean_content:4 of -msgid "This behaves similarly to :attr:`~discord.Message.clean_content`." -msgstr "" - -#: discord.ext.commands.clean_content:8 of -msgid "Whether to clean channel mentions." -msgstr "" - -#: discord.ext.commands.clean_content:14 of -msgid "Whether to use nicknames when transforming mentions." -msgstr "" - -#: discord.ext.commands.clean_content:20 of -msgid "Whether to also escape special markdown characters." -msgstr "" - -#: ../../ext/commands/api.rst:253 -msgid "" -"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." -msgstr "" - -#: ../../ext/commands/api.rst:257 -msgid "" -"When a parser error is met the greedy converter stops converting, undoes " -"the internal string parsing routine, and continues parsing regularly." -msgstr "" - -#: ../../ext/commands/api.rst:260 -msgid "For example, in the following code:" -msgstr "" - -#: ../../ext/commands/api.rst:268 -msgid "" -"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``\\." -msgstr "" - -#: ../../ext/commands/api.rst:271 -msgid "For more information, check :ref:`ext_commands_special_converters`." -msgstr "" - -#: ../../ext/commands/api.rst:276 -msgid "Exceptions" -msgstr "" - -#: discord.ext.commands.CommandError:1 of -msgid "The base exception type for all command related errors." -msgstr "コマンドに関連するエラーすべての基礎となる例外。" - -#: discord.ext.commands.CommandError:3 of -msgid "This inherits from :exc:`discord.DiscordException`." -msgstr "これは :exc:`discord.DiscordException` を継承しています。" - -#: discord.ext.commands.CommandError:5 of -msgid "" -"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`." -msgstr "" - -#: discord.ext.commands.ConversionError:1 of -msgid "Exception raised when a Converter class raises non-CommandError." -msgstr "Converter クラスで、CommandErrorではない例外が発生した際に、発生する例外。" - -#: discord.ext.commands.CommandNotFound:7 -#: discord.ext.commands.ConversionError:3 -#: discord.ext.commands.MaxConcurrencyReached:3 -#: discord.ext.commands.UserInputError:4 of -msgid "This inherits from :exc:`CommandError`." -msgstr "" - -#: discord.ext.commands.ConversionError:7 of -msgid "The converter that failed." -msgstr "" - -#: discord.ext.commands.ConversionError:9 of -msgid ":class:`discord.ext.commands.Converter`" -msgstr "" - -#: discord.ext.commands.CommandInvokeError:7 -#: discord.ext.commands.ConversionError:13 -#: discord.ext.commands.ExtensionFailed:13 of -msgid "" -"The original exception that was raised. You can also get this via the " -"``__cause__`` attribute." -msgstr "Converter内で発生した元の例外。 ``__cause__`` からも取得できます。" - -#: discord.ext.commands.CommandInvokeError:10 -#: discord.ext.commands.ConversionError:16 -#: discord.ext.commands.ExtensionFailed:16 of -msgid ":exc:`Exception`" -msgstr "" - -#: discord.ext.commands.MissingRequiredArgument:1 of -msgid "" -"Exception raised when parsing a command and a parameter that is required " -"is not encountered." -msgstr "コマンドのパラメータ解析の際、要求されたパラメータに値が渡されていない場合に発生します。" - -#: discord.ext.commands.BadArgument:4 discord.ext.commands.BadUnionArgument:4 -#: discord.ext.commands.MissingRequiredArgument:4 -#: discord.ext.commands.TooManyArguments:4 of -msgid "This inherits from :exc:`UserInputError`" -msgstr "" - -#: discord.ext.commands.MissingRequiredArgument:8 of -msgid "The argument that is missing." -msgstr "" - -#: discord.ext.commands.BadUnionArgument:10 -#: discord.ext.commands.MissingRequiredArgument:10 of -msgid ":class:`inspect.Parameter`" -msgstr "" - -#: discord.ext.commands.ArgumentParsingError:1 of -msgid "An exception raised when the parser fails to parse a user's input." -msgstr "" - -#: discord.ext.commands.ArgumentParsingError:3 of -msgid "This inherits from :exc:`UserInputError`." -msgstr "" - -#: discord.ext.commands.ArgumentParsingError:5 of -msgid "" -"There are child classes that implement more granular parsing errors for " -"i18n purposes." -msgstr "" - -#: discord.ext.commands.UnexpectedQuoteError:1 of -msgid "" -"An exception raised when the parser encounters a quote mark inside a non-" -"quoted string." -msgstr "" - -#: discord.ext.commands.ExpectedClosingQuoteError:3 -#: discord.ext.commands.InvalidEndOfQuotedStringError:4 -#: discord.ext.commands.UnexpectedQuoteError:3 of -msgid "This inherits from :exc:`ArgumentParsingError`." -msgstr "" - -#: discord.ext.commands.UnexpectedQuoteError:7 of -msgid "The quote mark that was found inside the non-quoted string." -msgstr "" - -#: discord.ext.commands.InvalidEndOfQuotedStringError:1 of -msgid "" -"An exception raised when a space is expected after the closing quote in a" -" string but a different character is found." -msgstr "" - -#: discord.ext.commands.InvalidEndOfQuotedStringError:8 of -msgid "The character found instead of the expected string." -msgstr "" - -#: discord.ext.commands.ExpectedClosingQuoteError:1 of -msgid "An exception raised when a quote character is expected but not found." -msgstr "" - -#: discord.ext.commands.ExpectedClosingQuoteError:7 of -msgid "The quote character expected." -msgstr "" - -#: discord.ext.commands.BadArgument:1 of -msgid "" -"Exception raised when a parsing or conversion failure is encountered on " -"an argument to pass into a command." -msgstr "コマンドの引数に渡された値の解析、または変換に失敗した場合に発生する例外。" - -#: discord.ext.commands.BadUnionArgument:1 of -msgid "" -"Exception raised when a :data:`typing.Union` converter fails for all its " -"associated types." -msgstr "" - -#: discord.ext.commands.BadUnionArgument:8 of -msgid "The parameter that failed being converted." -msgstr "" - -#: discord.ext.commands.BadUnionArgument:14 of -msgid "A tuple of converters attempted in conversion, in order of failure." -msgstr "" - -#: discord.ext.commands.BadUnionArgument:16 of -msgid "Tuple[Type, ...]" -msgstr "" - -#: discord.ext.commands.BadUnionArgument:20 of -msgid "A list of errors that were caught from failing the conversion." -msgstr "" - -#: discord.ext.commands.BadUnionArgument:22 of -msgid "List[:class:`CommandError`]" -msgstr "" - -#: discord.ext.commands.PrivateMessageOnly:1 of -msgid "" -"Exception raised when an operation does not work outside of private " -"message contexts." -msgstr "" - -#: discord.ext.commands.BotMissingAnyRole:4 -#: discord.ext.commands.BotMissingPermissions:4 -#: discord.ext.commands.BotMissingRole:3 discord.ext.commands.MissingAnyRole:4 -#: discord.ext.commands.MissingPermissions:4 discord.ext.commands.MissingRole:3 -#: discord.ext.commands.NoPrivateMessage:4 discord.ext.commands.NotOwner:3 -#: discord.ext.commands.PrivateMessageOnly:4 of -msgid "This inherits from :exc:`CheckFailure`" -msgstr "" - -#: discord.ext.commands.NoPrivateMessage:1 of -msgid "" -"Exception raised when an operation does not work in private message " -"contexts." -msgstr "プライベートメッセージコンテキストで、要求された処理が実行できない場合に発生する例外。" - -#: discord.ext.commands.CheckFailure:1 of -msgid "" -"Exception raised when the predicates in :attr:`.Command.checks` have " -"failed." -msgstr "" - -#: discord.ext.commands.CheckFailure:3 -#: discord.ext.commands.CommandInvokeError:3 -#: discord.ext.commands.CommandOnCooldown:3 -#: discord.ext.commands.DisabledCommand:3 of -msgid "This inherits from :exc:`CommandError`" -msgstr "" - -#: discord.ext.commands.CheckAnyFailure:1 of -msgid "Exception raised when all predicates in :func:`check_any` fail." -msgstr "" - -#: discord.ext.commands.CheckAnyFailure:3 -#: discord.ext.commands.NSFWChannelRequired:3 of -msgid "This inherits from :exc:`CheckFailure`." -msgstr "" - -#: discord.ext.commands.CheckAnyFailure:9 of -msgid "A list of errors that were caught during execution." -msgstr "" - -#: discord.ext.commands.CheckAnyFailure:11 of -msgid "List[:class:`CheckFailure`]" -msgstr "" - -#: discord.ext.commands.CheckAnyFailure:15 of -msgid "A list of check predicates that failed." -msgstr "" - -#: discord.ext.commands.CheckAnyFailure:17 of -msgid "List[Callable[[:class:`Context`], :class:`bool`]]" -msgstr "" - -#: discord.ext.commands.CommandNotFound:1 of -msgid "" -"Exception raised when a command is attempted to be invoked but no command" -" under that name is found." -msgstr "コマンドを呼び出す際に、指定された名前を持つコマンドが存在していなかった場合に発生する例外。" - -#: discord.ext.commands.CommandNotFound:4 of -msgid "" -"This is not raised for invalid subcommands, rather just the initial main " -"command that is attempted to be invoked." -msgstr "" - -#: discord.ext.commands.DisabledCommand:1 of -msgid "Exception raised when the command being invoked is disabled." -msgstr "呼び出そうとしたコマンドが無効化されていた際に発生する例外。" - -#: discord.ext.commands.CommandInvokeError:1 of -msgid "Exception raised when the command being invoked raised an exception." -msgstr "" - -#: discord.ext.commands.TooManyArguments:1 of -msgid "" -"Exception raised when the command was passed too many arguments and its " -":attr:`.Command.ignore_extra` attribute was not set to ``True``." -msgstr "" - -#: discord.ext.commands.UserInputError:1 of -msgid "" -"The base exception type for errors that involve errors regarding user " -"input." -msgstr "" - -#: discord.ext.commands.CommandOnCooldown:1 of -msgid "Exception raised when the command being invoked is on cooldown." -msgstr "" - -#: discord.ext.commands.CommandOnCooldown:7 of -msgid "" -"A class with attributes ``rate``, ``per``, and ``type`` similar to the " -":func:`.cooldown` decorator." -msgstr "" - -#: discord.ext.commands.CommandOnCooldown:10 of -msgid "Cooldown" -msgstr "" - -#: discord.ext.commands.CommandOnCooldown:14 of -msgid "The amount of seconds to wait before you can retry again." -msgstr "" - -#: discord.ext.commands.MaxConcurrencyReached:1 of -#, fuzzy -msgid "" -"Exception raised when the command being invoked has reached its maximum " -"concurrency." -msgstr "呼び出そうとしたコマンドが無効化されていた際に発生する例外。" - -#: discord.ext.commands.MaxConcurrencyReached:7 of -msgid "The maximum number of concurrent invokers allowed." -msgstr "" - -#: discord.ext.commands.MaxConcurrencyReached:13 of -msgid "The bucket type passed to the :func:`.max_concurrency` decorator." -msgstr "" - -#: discord.ext.commands.MaxConcurrencyReached:15 of -#, fuzzy -msgid ":class:`.BucketType`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.NotOwner:1 of -msgid "Exception raised when the message author is not the owner of the bot." -msgstr "" - -#: discord.ext.commands.MessageNotFound:1 of -msgid "Exception raised when the message provided was not found in the channel." -msgstr "" - -#: discord.ext.commands.BadBoolArgument:3 -#: discord.ext.commands.ChannelNotFound:3 -#: discord.ext.commands.ChannelNotReadable:4 -#: discord.ext.commands.EmojiNotFound:3 discord.ext.commands.MemberNotFound:4 -#: discord.ext.commands.MessageNotFound:3 -#: discord.ext.commands.PartialEmojiConversionFailure:4 -#: discord.ext.commands.RoleNotFound:3 discord.ext.commands.UserNotFound:4 of -#, fuzzy -msgid "This inherits from :exc:`BadArgument`" -msgstr "これは :exc:`discord.DiscordException` を継承しています。" - -#: discord.ext.commands.MessageNotFound:9 of -msgid "The message supplied by the caller that was not found" -msgstr "" - -#: discord.ext.commands.MemberNotFound:1 of -msgid "" -"Exception raised when the member provided was not found in the bot's " -"cache." -msgstr "" - -#: discord.ext.commands.MemberNotFound:10 of -msgid "The member supplied by the caller that was not found" -msgstr "" - -#: discord.ext.commands.UserNotFound:1 of -msgid "Exception raised when the user provided was not found in the bot's cache." -msgstr "" - -#: discord.ext.commands.UserNotFound:10 of -msgid "The user supplied by the caller that was not found" -msgstr "" - -#: discord.ext.commands.ChannelNotFound:1 of -#, fuzzy -msgid "Exception raised when the bot can not find the channel." -msgstr "呼び出そうとしたコマンドが無効化されていた際に発生する例外。" - -#: discord.ext.commands.ChannelNotFound:9 of -msgid "The channel supplied by the caller that was not found" -msgstr "" - -#: discord.ext.commands.ChannelNotReadable:1 of -#, fuzzy -msgid "" -"Exception raised when the bot does not have permission to read messages " -"in the channel." -msgstr ":exc:`.Forbidden` -- 指定のチャンネルを取得する権限がない。" - -#: discord.ext.commands.ChannelNotReadable:10 of -msgid "The channel supplied by the caller that was not readable" -msgstr "" - -#: discord.ext.commands.ChannelNotReadable:12 of -#, fuzzy -msgid ":class:`.abc.GuildChannel`" -msgstr ":class:`.Guild`" - -#: discord.ext.commands.RoleNotFound:1 of -#, fuzzy -msgid "Exception raised when the bot can not find the role." -msgstr "呼び出そうとしたコマンドが無効化されていた際に発生する例外。" - -#: discord.ext.commands.RoleNotFound:9 of -msgid "The role supplied by the caller that was not found" -msgstr "" - -#: discord.ext.commands.EmojiNotFound:1 of -msgid "Exception raised when the bot can not find the emoji." -msgstr "" - -#: discord.ext.commands.EmojiNotFound:9 of -msgid "The emoji supplied by the caller that was not found" -msgstr "" - -#: discord.ext.commands.PartialEmojiConversionFailure:1 of -msgid "" -"Exception raised when the emoji provided does not match the correct " -"format." -msgstr "" - -#: discord.ext.commands.PartialEmojiConversionFailure:10 of -msgid "The emoji supplied by the caller that did not match the regex" -msgstr "" - -#: discord.ext.commands.BadBoolArgument:1 of -msgid "Exception raised when a boolean argument was not convertable." -msgstr "" - -#: discord.ext.commands.BadBoolArgument:9 of -msgid "" -"The boolean argument supplied by the caller that is not in the predefined" -" list" -msgstr "" - -#: discord.ext.commands.MissingPermissions:1 of -msgid "" -"Exception raised when the command invoker lacks permissions to run a " -"command." -msgstr "" - -#: discord.ext.commands.BotMissingPermissions:8 -#: discord.ext.commands.MissingPermissions:8 of -msgid "The required permissions that are missing." -msgstr "" - -#: discord.ext.commands.BotMissingPermissions:1 of -msgid "Exception raised when the bot's member lacks permissions to run a command." -msgstr "" - -#: discord.ext.commands.MissingRole:1 of -msgid "Exception raised when the command invoker lacks a role to run a command." -msgstr "" - -#: discord.ext.commands.BotMissingRole:9 discord.ext.commands.MissingRole:9 of -msgid "" -"The required role that is missing. This is the parameter passed to " -":func:`~.commands.has_role`." -msgstr "" - -#: discord.ext.commands.BotMissingRole:12 discord.ext.commands.MissingRole:12 -#: of -msgid "Union[:class:`str`, :class:`int`]" -msgstr "" - -#: discord.ext.commands.BotMissingRole:1 of -msgid "Exception raised when the bot's member lacks a role to run a command." -msgstr "" - -#: discord.ext.commands.MissingAnyRole:1 of -msgid "" -"Exception raised when the command invoker lacks any of the roles " -"specified to run a command." -msgstr "" - -#: discord.ext.commands.MissingAnyRole:10 of -msgid "" -"The roles that the invoker is missing. These are the parameters passed to" -" :func:`~.commands.has_any_role`." -msgstr "" - -#: discord.ext.commands.BotMissingAnyRole:13 -#: discord.ext.commands.MissingAnyRole:13 of -msgid "List[Union[:class:`str`, :class:`int`]]" -msgstr "" - -#: discord.ext.commands.BotMissingAnyRole:1 of -msgid "" -"Exception raised when the bot's member lacks any of the roles specified " -"to run a command." -msgstr "" - -#: discord.ext.commands.BotMissingAnyRole:10 of -msgid "" -"The roles that the bot's member is missing. These are the parameters " -"passed to :func:`~.commands.has_any_role`." -msgstr "" - -#: discord.ext.commands.NSFWChannelRequired:1 of -msgid "Exception raised when a channel does not have the required NSFW setting." -msgstr "" - -#: discord.ext.commands.NSFWChannelRequired:7 of -msgid "The channel that does not have NSFW enabled." -msgstr "" - -#: discord.ext.commands.ExtensionError:1 of -msgid "Base exception for extension related errors." -msgstr "" - -#: discord.ext.commands.ExtensionError:3 of -msgid "This inherits from :exc:`~discord.DiscordException`." -msgstr "" - -#: discord.ext.commands.ExtensionError:7 of -msgid "The extension that had an error." -msgstr "" - -#: discord.ext.commands.ExtensionAlreadyLoaded:1 of -msgid "An exception raised when an extension has already been loaded." -msgstr "" - -#: discord.ext.commands.ExtensionAlreadyLoaded:3 -#: discord.ext.commands.ExtensionFailed:3 -#: discord.ext.commands.ExtensionNotFound:3 -#: discord.ext.commands.ExtensionNotLoaded:3 -#: discord.ext.commands.NoEntryPointError:3 of -msgid "This inherits from :exc:`ExtensionError`" -msgstr "" - -#: discord.ext.commands.ExtensionNotLoaded:1 of -msgid "An exception raised when an extension was not loaded." -msgstr "" - -#: discord.ext.commands.NoEntryPointError:1 of -msgid "" -"An exception raised when an extension does not have a ``setup`` entry " -"point function." -msgstr "" - -#: discord.ext.commands.ExtensionFailed:1 of -msgid "" -"An exception raised when an extension failed to load during execution of " -"the module or ``setup`` entry point." -msgstr "" - -#: discord.ext.commands.ExtensionFailed:7 -#: discord.ext.commands.ExtensionNotFound:10 of -msgid "The extension that had the error." -msgstr "" - -#: discord.ext.commands.ExtensionNotFound:1 of -#, fuzzy -msgid "An exception raised when an extension is not found." -msgstr "プライベートメッセージコンテキストで、要求された処理が実行できない場合に発生する例外。" - -#: discord.ext.commands.ExtensionNotFound:5 of -msgid "Made the ``original`` attribute always None." -msgstr "" - -#: discord.ext.commands.ExtensionNotFound:16 of -msgid "Always ``None`` for backwards compatibility." -msgstr "" - -#: discord.ext.commands.ExtensionNotFound:18 of -msgid ":class:`NoneType`" -msgstr "" - -#: discord.ext.commands.CommandRegistrationError:1 of -msgid "" -"An exception raised when the command can't be added because the name is " -"already taken by a different command." -msgstr "" - -#: discord.ext.commands.CommandRegistrationError:4 of -#, fuzzy -msgid "This inherits from :exc:`discord.ClientException`" -msgstr "これは :exc:`discord.DiscordException` を継承しています。" - -#: discord.ext.commands.CommandRegistrationError:10 of -msgid "The command name that had the error." -msgstr "" - -#: discord.ext.commands.CommandRegistrationError:16 of -msgid "Whether the name that conflicts is an alias of the command we try to add." -msgstr "" - -#: ../../ext/commands/api.rst:412 -msgid "Exception Hierarchy" -msgstr "" - -#: ../../ext/commands/api.rst:460 -msgid ":exc:`~.DiscordException`" -msgstr "" - -#: ../../ext/commands/api.rst:454 -msgid ":exc:`~.commands.CommandError`" -msgstr "" - -#: ../../ext/commands/api.rst:418 -msgid ":exc:`~.commands.ConversionError`" -msgstr "" - -#: ../../ext/commands/api.rst:437 -msgid ":exc:`~.commands.UserInputError`" -msgstr "" - -#: ../../ext/commands/api.rst:420 -msgid ":exc:`~.commands.MissingRequiredArgument`" -msgstr "" - -#: ../../ext/commands/api.rst:421 -msgid ":exc:`~.commands.TooManyArguments`" -msgstr "" - -#: ../../ext/commands/api.rst:432 -msgid ":exc:`~.commands.BadArgument`" -msgstr "" - -#: ../../ext/commands/api.rst:423 -msgid ":exc:`~.commands.MessageNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:424 -msgid ":exc:`~.commands.MemberNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:425 -msgid ":exc:`~.commands.UserNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:426 -msgid ":exc:`~.commands.ChannelNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:427 -msgid ":exc:`~.commands.ChannelNotReadable`" -msgstr "" - -#: ../../ext/commands/api.rst:428 -msgid ":exc:`~.commands.BadColourArgument`" -msgstr "" - -#: ../../ext/commands/api.rst:429 -msgid ":exc:`~.commands.RoleNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:430 -msgid ":exc:`~.commands.BadInviteArgument`" -msgstr "" - -#: ../../ext/commands/api.rst:431 -msgid ":exc:`~.commands.EmojiNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:432 -msgid ":exc:`~.commands.PartialEmojiConversionFailure`" -msgstr "" - -#: ../../ext/commands/api.rst:433 -msgid ":exc:`~.commands.BadBoolArgument`" -msgstr "" - -#: ../../ext/commands/api.rst:434 -msgid ":exc:`~.commands.BadUnionArgument`" -msgstr "" - -#: ../../ext/commands/api.rst:437 -msgid ":exc:`~.commands.ArgumentParsingError`" -msgstr "" - -#: ../../ext/commands/api.rst:436 -msgid ":exc:`~.commands.UnexpectedQuoteError`" -msgstr "" - -#: ../../ext/commands/api.rst:437 -msgid ":exc:`~.commands.InvalidEndOfQuotedStringError`" -msgstr "" - -#: ../../ext/commands/api.rst:438 -msgid ":exc:`~.commands.ExpectedClosingQuoteError`" -msgstr "" - -#: ../../ext/commands/api.rst:439 -msgid ":exc:`~.commands.CommandNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:450 -msgid ":exc:`~.commands.CheckFailure`" -msgstr "" - -#: ../../ext/commands/api.rst:441 -msgid ":exc:`~.commands.CheckAnyFailure`" -msgstr "" - -#: ../../ext/commands/api.rst:442 -msgid ":exc:`~.commands.PrivateMessageOnly`" -msgstr "" - -#: ../../ext/commands/api.rst:443 -msgid ":exc:`~.commands.NoPrivateMessage`" -msgstr "" - -#: ../../ext/commands/api.rst:444 -msgid ":exc:`~.commands.NotOwner`" -msgstr "" - -#: ../../ext/commands/api.rst:445 -msgid ":exc:`~.commands.MissingPermissions`" -msgstr "" - -#: ../../ext/commands/api.rst:446 -msgid ":exc:`~.commands.BotMissingPermissions`" -msgstr "" - -#: ../../ext/commands/api.rst:447 -msgid ":exc:`~.commands.MissingRole`" -msgstr "" - -#: ../../ext/commands/api.rst:448 -msgid ":exc:`~.commands.BotMissingRole`" -msgstr "" - -#: ../../ext/commands/api.rst:449 -msgid ":exc:`~.commands.MissingAnyRole`" -msgstr "" - -#: ../../ext/commands/api.rst:450 -msgid ":exc:`~.commands.BotMissingAnyRole`" -msgstr "" - -#: ../../ext/commands/api.rst:451 -msgid ":exc:`~.commands.NSFWChannelRequired`" -msgstr "" - -#: ../../ext/commands/api.rst:452 -msgid ":exc:`~.commands.DisabledCommand`" -msgstr "" - -#: ../../ext/commands/api.rst:453 -msgid ":exc:`~.commands.CommandInvokeError`" -msgstr "" - -#: ../../ext/commands/api.rst:454 -msgid ":exc:`~.commands.CommandOnCooldown`" -msgstr "" - -#: ../../ext/commands/api.rst:455 -msgid ":exc:`~.commands.MaxConcurrencyReached`" -msgstr "" - -#: ../../ext/commands/api.rst:460 -msgid ":exc:`~.commands.ExtensionError`" -msgstr "" - -#: ../../ext/commands/api.rst:457 -msgid ":exc:`~.commands.ExtensionAlreadyLoaded`" -msgstr "" - -#: ../../ext/commands/api.rst:458 -msgid ":exc:`~.commands.ExtensionNotLoaded`" -msgstr "" - -#: ../../ext/commands/api.rst:459 -msgid ":exc:`~.commands.NoEntryPointError`" -msgstr "" - -#: ../../ext/commands/api.rst:460 -msgid ":exc:`~.commands.ExtensionFailed`" -msgstr "" - -#: ../../ext/commands/api.rst:461 -msgid ":exc:`~.commands.ExtensionNotFound`" -msgstr "" - -#: ../../ext/commands/api.rst:462 -msgid ":exc:`~.ClientException`" -msgstr "" - -#: ../../ext/commands/api.rst:463 -msgid ":exc:`~.commands.CommandRegistrationError`" -msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- 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." -#~ msgstr "" -#~ ":class:`bool` -- コマンドを大文字と小文字を区別するかどうか。デフォルトでは " -#~ "``False`` " -#~ "です。この属性はグループコマンドには影響されません。もしグループコマンドでも大文字と小文字の区別が必要な場合、すべてのグループでの設定が必要になります。" - -#~ msgid "" -#~ "Optional[Union[:class:`.Activity`, :class:`.Game`, " -#~ ":class:`.Streaming`]] -- The activity being" -#~ " used upon logging in." -#~ msgstr "" -#~ "Optional[Union[:class:`.Activity`, :class:`.Game`, " -#~ ":class:`.Streaming`]] -- ログイン時のアクティビティ。" - -#~ msgid ":exc:`.ClientException` -- If the command is already registered." -#~ msgstr ":exc:`.ClientException` -- コマンドがすでに登録されている。" - -#~ msgid "" -#~ "The activity parameter is a " -#~ ":class:`.Activity` object (not a string) " -#~ "that represents the activity being done" -#~ " currently. This could also be the" -#~ " slimmed down versions, :class:`.Game` and" -#~ " :class:`.Streaming`." -#~ msgstr "" -#~ "activityパラメータは、現在のアクティビティを示す :class:`.Activity` " -#~ "オブジェクトです(これはstringではありません)。スリム化された :class:`.Game` や " -#~ ":class:`.Streaming` でも可能です。" - -#~ msgid "" -#~ ":exc:`.InvalidArgument` -- Invalid icon image" -#~ " format given. Must be PNG or " -#~ "JPG." -#~ msgstr "" - -#~ msgid "" -#~ "Mapping[:class:`str`, :class:`py:types.ModuleType`] -- " -#~ "A read-only mapping of extension " -#~ "name to extension." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`.InvalidData` -- An unknown channel " -#~ "type was received from Discord." -#~ msgstr "" - -#~ msgid ":exc:`.NotFound` -- Invalid Channel ID." -#~ msgstr ":exc:`.NotFound` -- チャンネルのIDが無効。" - -#~ msgid "" -#~ "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." -#~ msgstr "" - -#~ msgid ":exc:`.NotFound` -- The invite has expired or is invalid." -#~ msgstr "" - -#~ msgid ":exc:`.HTTPException` -- Getting the invite failed." -#~ msgstr "" - -#~ msgid ":exc:`.NotFound` -- A user with this ID does not exist." -#~ msgstr "" - -#~ msgid ":exc:`.HTTPException` -- Fetching the user failed." -#~ msgstr "" - -#~ msgid "" -#~ "Gets an arbitrary user's profile. This" -#~ " can only be used by non-bot" -#~ " accounts." -#~ msgstr "" - -#~ msgid ":exc:`.Forbidden` -- Not allowed to fetch profiles." -#~ msgstr "" - -#~ msgid ":exc:`.HTTPException` -- Fetching the profile failed." -#~ msgstr "" - -#~ msgid ":exc:`.HTTPException` -- Retrieving the webhook failed." -#~ msgstr "" - -#~ msgid ":exc:`.NotFound` -- Invalid webhook ID." -#~ msgstr "" - -#~ msgid ":exc:`.Forbidden` -- You do not have permission to fetch this webhook." -#~ msgstr "" - -#~ msgid ":exc:`.Forbidden` -- The widget for this guild is disabled." -#~ msgstr "" - -#~ msgid ":exc:`.HTTPException` -- Retrieving the widget failed." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[Union[:class:`.abc.GuildChannel`, " -#~ ":class:`.abc.PrivateChannel`]]: Returns a channel" -#~ " with the given ID." -#~ msgstr "" - -#~ msgid "If not found, returns ``None``." -#~ msgstr "" - -#~ msgid "" -#~ "Get a :class:`.Command` or subclasses " -#~ "from the internal list of commands." -#~ msgstr "" - -#~ msgid "Optional[:class:`.Emoji`]: Returns an emoji with the given ID." -#~ msgstr "" - -#~ msgid "Optional[:class:`.Guild`]: Returns a guild with the given ID." -#~ msgstr "" - -#~ msgid "Optional[:class:`~discord.User`]: Returns a user with the given ID." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`.Guild`] -- The guilds that " -#~ "the connected client is a member " -#~ "of." -#~ msgstr "" - -#~ msgid "Indicates if the websocket connection is closed." -#~ msgstr "" - -#~ msgid "Specifies if the client's internal cache is ready for use." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`float` -- Measures latency between " -#~ "a HEARTBEAT and a HEARTBEAT_ACK in " -#~ "seconds." -#~ msgstr "" - -#~ msgid ":exc:`ExtensionNotFound` -- The extension could not be imported." -#~ msgstr "" - -#~ msgid ":exc:`ExtensionAlreadyLoaded` -- The extension is already loaded." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`NoEntryPointError` -- The extension does" -#~ " not have a setup function." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`ExtensionFailed` -- The extension setup" -#~ " function had an execution error." -#~ msgstr "" - -#~ msgid "" -#~ "Logging on with a user token is" -#~ " against the Discord `Terms of " -#~ "Service `_ and doing so might" -#~ " potentially get your account banned. " -#~ "Use this at your own risk." -#~ msgstr "" - -#~ msgid ":exc:`.LoginFailure` -- The wrong credentials are passed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`.HTTPException` -- An unknown HTTP " -#~ "related error occurred, usually when it" -#~ " isn't 200 or the known incorrect " -#~ "credentials passing status code." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`.abc.PrivateChannel`] -- The private" -#~ " channels that the connected client " -#~ "is participating on." -#~ msgstr "" - -#~ msgid ":exc:`ExtensionNotLoaded` -- The extension was not loaded." -#~ msgstr "" - -#~ msgid "" -#~ "Remove a :class:`.Command` or subclasses " -#~ "from the internal list of commands." -#~ msgstr "" - -#~ msgid "" -#~ "The command that was removed. If " -#~ "the name is not valid then `None`" -#~ " is returned instead." -#~ msgstr "" - -#~ msgid ":class:`.Command` or subclass" -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`.InvalidArgument` -- If any guild " -#~ "is unavailable or not large in the" -#~ " collection." -#~ msgstr "" - -#~ msgid ":exc:`TypeError` -- An unexpected keyword argument was received." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`.ClientUser`] -- Represents the " -#~ "connected client. None if not logged " -#~ "in." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`~discord.User`] -- Returns a list" -#~ " of all the users the bot can" -#~ " see." -#~ msgstr "" - -#~ msgid "List[:class:`.VoiceClient`] -- Represents a list of voice connections." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`asyncio.TimeoutError` -- If a timeout" -#~ " is provided and it was reached." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`TypeError` -- If the function is" -#~ " not a coroutine or is already " -#~ "a command." -#~ msgstr "" - -#~ msgid ":class:`str` -- The name of the command." -#~ msgstr "" - -#~ msgid "" -#~ ":ref:`coroutine ` -- The coroutine" -#~ " that is executed when the command" -#~ " is called." -#~ msgstr "" - -#~ msgid ":class:`str` -- The long help text for the command." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The short help text " -#~ "for the command. If this is not" -#~ " specified then the first line of " -#~ "the long help text is used " -#~ "instead." -#~ msgstr "" - -#~ msgid ":class:`str` -- A replacement for arguments in the default help text." -#~ msgstr "" - -#~ msgid ":class:`list` -- The list of aliases the command can be invoked under." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- 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``." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`Command`] -- The parent " -#~ "command that this command belongs to." -#~ " ``None`` if there isn't one." -#~ msgstr "" - -#~ msgid "" -#~ "List[Callable[..., :class:`bool`]] -- 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." -#~ msgstr "" - -#~ msgid ":class:`str` -- The message prefixed into the default help command." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- If ``True``\\, the " -#~ "default help command does not show " -#~ "this in the help output." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- 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``." -#~ msgstr "" - -#~ msgid "Optional[:class:`Command`] -- The subcommand that was invoked, if any." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- 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``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- 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``." -#~ msgstr "" - -#~ msgid "" -#~ "Retrieves the parameter OrderedDict without" -#~ " the context or self parameters." -#~ msgstr "" - -#~ msgid ":class:`str` -- Retrieves the fully qualified parent command name." -#~ msgstr "" - -#~ msgid ":class:`Command` -- Retrieves the parents of this command." -#~ msgstr "" - -#~ msgid ":class:`str` -- Retrieves the fully qualified command name." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The name of the " -#~ "cog this command belongs to. None " -#~ "otherwise." -#~ msgstr "" - -#~ msgid ":class:`str` -- Gets the \"short\" documentation of a command." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- Returns a POSIX-like " -#~ "signature useful for help command " -#~ "output." -#~ msgstr "" - -#~ msgid "" -#~ "Checks if the command can be " -#~ "executed by checking all the predicates" -#~ " inside the :attr:`.checks` attribute." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`CommandError` -- Any command error " -#~ "that was raised during a check " -#~ "call will be propagated by this " -#~ "function." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`bool`] -- 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``." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`bool`] -- Indicates if the" -#~ " group's commands should be case " -#~ "insensitive. Defaults to ``False``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- A mapping of command" -#~ " name to :class:`.Command` or subclass " -#~ "objects." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Whether the commands " -#~ "should be case insensitive. Defaults to" -#~ " ``False``." -#~ msgstr "" - -#~ msgid "" -#~ "Returns a :class:`list` of " -#~ ":class:`.Command`\\s that are defined inside" -#~ " this cog." -#~ msgstr "" - -#~ msgid ":class:`str` -- Returns the cog's specified name, not the class name." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- Returns the cog's " -#~ "description, typically the cleaned docstring." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`TypeError` -- The function is not" -#~ " a coroutine function or a string " -#~ "was not passed as the name." -#~ msgstr "" - -#~ msgid "This function **can** be a coroutine." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The cog name. By " -#~ "default, it is the name of the " -#~ "class with no modification." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- A list of attributes" -#~ " to apply to every command inside " -#~ "this cog. The dictionary is passed " -#~ "into the :class:`Command` (or its " -#~ "subclass) 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:" -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`Context`] -- The context that" -#~ " invoked this help formatter. This is" -#~ " generally set after the help command" -#~ " assigned, :func:`command_callback`\\, has been" -#~ " called." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Specifies if hidden " -#~ "commands should be shown in the " -#~ "output. Defaults to ``False``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Specifies if commands " -#~ "should have their :attr:`.Command.checks` " -#~ "called and verified. Defaults to " -#~ "``True``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- 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." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- The maximum number of" -#~ " characters that fit in a line. " -#~ "Defaults to 80." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- Whether to sort the " -#~ "commands in the output alphabetically. " -#~ "Defaults to ``True``." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`bool`] -- 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``." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`int`] -- 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." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`int` -- How much to intend " -#~ "the commands from a heading. Defaults" -#~ " to ``2``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The command list's " -#~ "heading string used when the help " -#~ "command is invoked with a category " -#~ "name. Useful for i18n. Defaults to " -#~ "``\"Commands:\"``" -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The string used when " -#~ "there is a command which does not" -#~ " belong to any category(cog). Useful " -#~ "for i18n. Defaults to ``\"No " -#~ "Category\"``" -#~ msgstr "" - -#~ msgid "" -#~ ":class:`Paginator` -- The paginator used " -#~ "to paginate the help command output." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The command list's " -#~ "heading string used when the help " -#~ "command is invoked with a category " -#~ "name. Useful for i18n. Defaults to " -#~ "``\"Commands\"``" -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The alias list's heading" -#~ " string used to list the aliases " -#~ "of the command. Useful for i18n. " -#~ "Defaults to ``\"Aliases:\"``." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- The prefix inserted" -#~ " to every page. e.g. three backticks." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- The suffix appended" -#~ " at the end of every page. e.g." -#~ " three backticks." -#~ msgstr "" - -#~ msgid ":class:`int` -- The maximum amount of codepoints allowed in a page." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`RuntimeError` -- The line was too" -#~ " big for the current :attr:`max_size`." -#~ msgstr "" - -#~ msgid "These functions can either be regular functions or coroutines." -#~ msgstr "" - -#~ msgid "" -#~ "A decorator that adds a cooldown " -#~ "to a :class:`.Command` or its " -#~ "subclasses." -#~ msgstr "" - -#~ msgid "" -#~ "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, or global basis. Denoted by" -#~ " the third argument of ``type`` which" -#~ " must be of enum type ``BucketType``" -#~ " which could be either:" -#~ msgstr "" - -#~ msgid "``BucketType.default`` for a global basis." -#~ msgstr "" - -#~ msgid "``BucketType.user`` for a per-user basis." -#~ msgstr "" - -#~ msgid "``BucketType.guild`` for a per-guild basis." -#~ msgstr "" - -#~ msgid "``BucketType.channel`` for a per-channel basis." -#~ msgstr "" - -#~ msgid "``BucketType.member`` for a per-member basis." -#~ msgstr "" - -#~ msgid "``BucketType.category`` for a per-category basis." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`.Message` -- The message that " -#~ "triggered the command being executed." -#~ msgstr "" - -#~ msgid ":class:`.Bot` -- The bot that contains the command being executed." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`list` -- 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." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`dict` -- 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." -#~ msgstr "" - -#~ msgid ":class:`str` -- The prefix that was used to invoke the command." -#~ msgstr "" - -#~ msgid "" -#~ "The command (i.e. :class:`.Command` or " -#~ "its subclasses) that is being invoked" -#~ " currently." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The command name that" -#~ " triggered this invocation. Useful for " -#~ "finding out which alias called the " -#~ "command." -#~ msgstr "" - -#~ msgid "" -#~ "The subcommand (i.e. :class:`.Command` or " -#~ "its subclasses) that was invoked. If " -#~ "no valid subcommand was invoked then " -#~ "this is equal to ``None``." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`str`] -- 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``." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`bool` -- A boolean that " -#~ "indicates if the command failed to " -#~ "be parsed, checked, or invoked." -#~ msgstr "" - -#~ msgid "" -#~ "You must have " -#~ ":attr:`~.Permissions.read_message_history` permissions to" -#~ " use this." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have permissions to get channel message" -#~ " history." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.HTTPException` -- The request " -#~ "to get message history failed." -#~ msgstr "" - -#~ msgid "" -#~ "Returns the channel associated with this" -#~ " context's command. Shorthand for " -#~ ":attr:`.Message.channel`." -#~ msgstr "" - -#~ msgid "" -#~ "Returns the author associated with this" -#~ " context's command. Shorthand for " -#~ ":attr:`.Message.author`" -#~ msgstr "" - -#~ msgid ":exc:`~discord.NotFound` -- The specified message was not found." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have the permissions required to get " -#~ "a message." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Retrieving the message failed." -#~ msgstr "" - -#~ msgid "A command or subclass of a command that is going to be called." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Retrieving the pinned messages failed." -#~ msgstr "" - -#~ msgid ":exc:`~discord.HTTPException` -- Sending the message failed." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.Forbidden` -- You do not " -#~ "have the proper permissions to send " -#~ "the message." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`~discord.InvalidArgument` -- The ``files`` " -#~ "list is not of the appropriate " -#~ "size or you specified both ``file`` " -#~ "and ``files``." -#~ msgstr "" - -#~ msgid "" -#~ "Similar to :attr:`.Guild.me` except it " -#~ "may return the :class:`.ClientUser` in " -#~ "private message contexts." -#~ msgstr "" - -#~ msgid "" -#~ "Optional[:class:`.VoiceClient`] -- A shortcut " -#~ "to :attr:`.Guild.voice_client`\\, if applicable." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether to clean channel mentions." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether to use nicknames when transforming mentions." -#~ msgstr "" - -#~ msgid ":class:`bool` -- Whether to also escape special markdown characters." -#~ msgstr "" - -#~ msgid ":class:`discord.ext.commands.Converter` -- The converter that failed." -#~ msgstr "" - -#~ msgid ":class:`inspect.Parameter` -- The argument that is missing." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`str` -- The quote mark that " -#~ "was found inside the non-quoted " -#~ "string." -#~ msgstr "" - -#~ msgid ":class:`str` -- The character found instead of the expected string." -#~ msgstr "" - -#~ msgid ":class:`str` -- The quote character expected." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`inspect.Parameter` -- The parameter " -#~ "that failed being converted." -#~ msgstr "" - -#~ msgid "" -#~ "*Tuple[Type, ...]* -- A tuple of " -#~ "converters attempted in conversion, in " -#~ "order of failure." -#~ msgstr "" - -#~ msgid "" -#~ "List[:class:`CommandError`] -- A list of " -#~ "errors that were caught from failing " -#~ "the conversion." -#~ msgstr "" - -#~ msgid "" -#~ "*Cooldown* -- A class with attributes" -#~ " ``rate``, ``per``, and ``type`` similar" -#~ " to the :func:`.cooldown` decorator." -#~ msgstr "" - -#~ msgid "" -#~ ":class:`float` -- The amount of seconds" -#~ " to wait before you can retry " -#~ "again." -#~ msgstr "" - -#~ msgid ":class:`list` -- The required permissions that are missing." -#~ msgstr "" - -#~ msgid "" -#~ "Union[:class:`str`, :class:`int`] -- The " -#~ "required role that is missing. This " -#~ "is the parameter passed to " -#~ ":func:`~.commands.has_role`." -#~ msgstr "" - -#~ msgid "" -#~ "List[Union[:class:`str`, :class:`int`]] -- The " -#~ "roles that the invoker is missing. " -#~ "These are the parameters passed to " -#~ ":func:`~.commands.has_any_role`." -#~ msgstr "" - -#~ msgid "" -#~ "List[Union[:class:`str`, :class:`int`]] -- The " -#~ "roles that the bot's member is " -#~ "missing. These are the parameters passed" -#~ " to :func:`~.commands.has_any_role`." -#~ msgstr "" - -#~ msgid ":class:`str` -- The extension that had an error." -#~ msgstr "" - -#~ msgid "" -#~ "An exception raised when an extension" -#~ " failed to load during execution of" -#~ " the ``setup`` entry point." -#~ msgstr "" - -#~ msgid ":class:`str` -- The extension that had the error." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`Exception` -- The original exception " -#~ "that was raised. You can also get" -#~ " this via the ``__cause__`` attribute." -#~ msgstr "" - -#~ msgid "An exception raised when an extension failed to be imported." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`ImportError` -- The original exception" -#~ " that was raised. You can also " -#~ "get this via the ``__cause__`` " -#~ "attribute." -#~ msgstr "" - diff --git a/docs/locale/ja/LC_MESSAGES/ext/commands/cogs.po b/docs/locale/ja/LC_MESSAGES/ext/commands/cogs.po deleted file mode 100644 index c4b657ad..00000000 --- a/docs/locale/ja/LC_MESSAGES/ext/commands/cogs.po +++ /dev/null @@ -1,179 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: /ext/commands/cogs.pot\n" -"X-Crowdin-File-ID: 60\n" -"Language: ja_JP\n" - -#: ../../ext/commands/cogs.rst:6 -msgid "Cogs" -msgstr "コグ" - -#: ../../ext/commands/cogs.rst:8 -msgid "There comes a point in your bot's development when you want to organize a collection of commands, listeners, and some state into one class. Cogs allow you to do just that." -msgstr "Bot開発においてコマンドやリスナー、いくつかの状態を一つのクラスにまとめてしまいたい場合があるでしょう。コグはそれを実現したものです。" - -#: ../../ext/commands/cogs.rst:10 -msgid "The gist:" -msgstr "要旨:" - -#: ../../ext/commands/cogs.rst:12 -msgid "Each cog is a Python class that subclasses :class:`.commands.Cog`." -msgstr "すべてのコグは :class:`.commands.Cog` を継承したPythonクラスです。" - -#: ../../ext/commands/cogs.rst:13 -msgid "Every command is marked with the :func:`.commands.command` decorator." -msgstr "すべてのコマンドは :func:`.commands.command` デコレータでデコレートされます。" - -#: ../../ext/commands/cogs.rst:14 -msgid "Every listener is marked with the :meth:`.commands.Cog.listener` decorator." -msgstr "すべてのリスナーは :meth:`.commands.Cog.listener` デコレータでデコレートされます。" - -#: ../../ext/commands/cogs.rst:15 -msgid "Cogs are then registered with the :meth:`.Bot.add_cog` call." -msgstr "コグは :meth:`.Bot.add_cog` を呼び出して登録します。" - -#: ../../ext/commands/cogs.rst:16 -msgid "Cogs are subsequently removed with the :meth:`.Bot.remove_cog` call." -msgstr "コグは :meth:`.Bot.remove_cog` の呼び出しで削除されます。" - -#: ../../ext/commands/cogs.rst:18 -msgid "It should be noted that cogs are typically used alongside with :ref:`ext_commands_extensions`." -msgstr "コグは :ref:`ext_commands_extensions` とともに使用されるのが一般的であることを覚えておきましょう。" - -#: ../../ext/commands/cogs.rst:21 -msgid "Quick Example" -msgstr "簡単な例" - -#: ../../ext/commands/cogs.rst:23 -msgid "This example cog defines a ``Greetings`` category for your commands, with a single :ref:`command ` named ``hello`` as well as a listener to listen to an :ref:`Event `." -msgstr "この例で紹介するコグは ``hello`` という名前の :ref:`command ` と、 :ref:`Event ` をリッスンするリスナーを実装した ``Greetings`` という名前のコマンドカテゴリを定義しています。" - -#: ../../ext/commands/cogs.rst:48 -msgid "A couple of technical notes to take into consideration:" -msgstr "考慮すべき二つのテクニカルノート:" - -#: ../../ext/commands/cogs.rst:50 -msgid "All listeners must be explicitly marked via decorator, :meth:`~.commands.Cog.listener`." -msgstr "すべてのリスナーは :meth:`~.commands.Cog.listener` で明示的にデコレートする必要があります。" - -#: ../../ext/commands/cogs.rst:51 -msgid "The name of the cog is automatically derived from the class name but can be overridden. See :ref:`ext_commands_cogs_meta_options`." -msgstr "コグの名前は、自動的にクラスの名前が引用されますが、上書きも可能です。 :ref:`ext_commands_cogs_meta_options` を参照してください。" - -#: ../../ext/commands/cogs.rst:52 -msgid "All commands must now take a ``self`` parameter to allow usage of instance attributes that can be used to maintain state." -msgstr "すべてのコマンドは状態を保持するインスタンスの属性を使用するために ``self`` パラメータを持つ必要があります。" - -#: ../../ext/commands/cogs.rst:55 -msgid "Cog Registration" -msgstr "コグの登録" - -#: ../../ext/commands/cogs.rst:57 -msgid "Once you have defined your cogs, you need to tell the bot to register the cogs to be used. We do this via the :meth:`~.commands.Bot.add_cog` method." -msgstr "コグを定義したら、Botにコグを登録する処理が必要になります。 :meth:`~.commands.Bot.add_cog` メソッドを用いて登録ができます。" - -#: ../../ext/commands/cogs.rst:63 -msgid "This binds the cog to the bot, adding all commands and listeners to the bot automatically." -msgstr "これはコグとBotを紐づけ、すべてのコマンドとリスナーを自動的にBotに追加します。" - -#: ../../ext/commands/cogs.rst:65 -msgid "Note that we reference the cog by name, which we can override through :ref:`ext_commands_cogs_meta_options`. So if we ever want to remove the cog eventually, we would have to do the following." -msgstr "コグを名前で参照している点に注意してください。これは :ref:`ext_commands_cogs_meta_options` でオーバーライドが可能です。そのため、最終的にコグを削除したい場合は、次の処理を行う必要があります。" - -#: ../../ext/commands/cogs.rst:72 -msgid "Using Cogs" -msgstr "コグの使用" - -#: ../../ext/commands/cogs.rst:74 -msgid "Just as we remove a cog by its name, we can also retrieve it by its name as well. This allows us to use a cog as an inter-command communication protocol to share data. For example:" -msgstr "コグを名前で削除するのと同様に、名前でコグを検索することもできます。これによってコグをデータ共有のためのコマンド間通信プロトコルとして使うことができます。例えば:" - -#: ../../ext/commands/cogs.rst:109 -msgid "Special Methods" -msgstr "特殊なメソッド" - -#: ../../ext/commands/cogs.rst:111 -msgid "As cogs get more complicated and have more commands, there comes a point where we want to customise the behaviour of the entire cog or bot." -msgstr "コグが複雑化し、多くのコマンドを持つようになるにつれ、コグあるいはBot全体の挙動をカスタマイズしたくなることがあります。" - -#: ../../ext/commands/cogs.rst:113 -msgid "They are as follows:" -msgstr "そのための特殊なメソッドは以下のとおりです:" - -#: ../../ext/commands/cogs.rst:115 -msgid ":meth:`.Cog.cog_unload`" -msgstr ":meth:`.Cog.cog_unload`" - -#: ../../ext/commands/cogs.rst:116 -msgid ":meth:`.Cog.cog_check`" -msgstr ":meth:`.Cog.cog_check`" - -#: ../../ext/commands/cogs.rst:117 -msgid ":meth:`.Cog.cog_command_error`" -msgstr ":meth:`.Cog.cog_command_error`" - -#: ../../ext/commands/cogs.rst:118 -msgid ":meth:`.Cog.cog_before_invoke`" -msgstr ":meth:`.Cog.cog_before_invoke`" - -#: ../../ext/commands/cogs.rst:119 -msgid ":meth:`.Cog.cog_after_invoke`" -msgstr ":meth:`.Cog.cog_after_invoke`" - -#: ../../ext/commands/cogs.rst:120 -msgid ":meth:`.Cog.bot_check`" -msgstr ":meth:`.Cog.bot_check`" - -#: ../../ext/commands/cogs.rst:121 -msgid ":meth:`.Cog.bot_check_once`" -msgstr ":meth:`.Cog.bot_check_once`" - -#: ../../ext/commands/cogs.rst:123 -msgid "You can visit the reference to get more detail." -msgstr "詳細はリファレンスを参照してください。" - -#: ../../ext/commands/cogs.rst:128 -msgid "Meta Options" -msgstr "メタオプション" - -#: ../../ext/commands/cogs.rst:130 -msgid "At the heart of a cog resides a metaclass, :class:`.commands.CogMeta`, which can take various options to customise some of the behaviour. To do this, we pass keyword arguments to the class definition line. For example, to change the cog name we can pass the ``name`` keyword argument as follows:" -msgstr "コグの中核にはメタクラスである :class:`.commands.CogMeta` が存在します。これにはいくつかの挙動を変更ができる様々なオプションが用意されています。オプションを使用する際はキーワード引数をクラス定義の行で渡します。例えば、コグの名前を変更する場合はキーワード引数 ``name`` を次のように渡します。" - -#: ../../ext/commands/cogs.rst:137 -msgid "To see more options that you can set, see the documentation of :class:`.commands.CogMeta`." -msgstr "設定可能な他のオプションについては :class:`.commands.CogMeta` のドキュメントを参照してください。" - -#: ../../ext/commands/cogs.rst:140 -msgid "Inspection" -msgstr "インスペクション" - -#: ../../ext/commands/cogs.rst:142 -msgid "Since cogs ultimately are classes, we have some tools to help us inspect certain properties of the cog." -msgstr "コグは究極的にはクラスのため、コグの特定のプロパティを調べるのに役立つツールがいくつか用意されています。" - -#: ../../ext/commands/cogs.rst:145 -msgid "To get a :class:`list` of commands, we can use :meth:`.Cog.get_commands`. ::" -msgstr ":meth:`.Cog.get_commands` を使うことで、コマンドの :class:`list` を取得できます。" - -#: ../../ext/commands/cogs.rst:151 -msgid "If we want to get the subcommands as well, we can use the :meth:`.Cog.walk_commands` generator. ::" -msgstr "サブコマンドを取得したい場合は :meth:`.Cog.walk_commands` ジェネレータを使うことができます。" - -#: ../../ext/commands/cogs.rst:155 -msgid "To do the same with listeners, we can query them with :meth:`.Cog.get_listeners`. This returns a list of tuples -- the first element being the listener name and the second one being the actual function itself. ::" -msgstr "これ同様の処理をリスナーで行う場合は、 :meth:`.Cog.get_listeners` が使用できます。これはタプルのリストを返します -- 最初の要素がリスナーの名前で、二つ目の要素が関数そのものです。" - diff --git a/docs/locale/ja/LC_MESSAGES/ext/commands/commands.po b/docs/locale/ja/LC_MESSAGES/ext/commands/commands.po deleted file mode 100644 index 6f6d3ecb..00000000 --- a/docs/locale/ja/LC_MESSAGES/ext/commands/commands.po +++ /dev/null @@ -1,901 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../ext/commands/commands.rst:6 -msgid "Commands" -msgstr "コマンド" - -#: ../../ext/commands/commands.rst:8 -msgid "" -"One of the most appealing aspect of the command extension is how easy it " -"is to define commands and how you can arbitrarily nest groups and " -"commands to have a rich sub-command system." -msgstr "コマンド拡張の最も魅力的な機能の一つは、簡単にコマンドが定義でき、かつそのコマンドを好きなようにネスト状にして、豊富なサブコマンドを用意することができる点です。" - -#: ../../ext/commands/commands.rst:11 -msgid "" -"Commands are defined by attaching it to a regular Python function. The " -"command is then invoked by the user using a similar signature to the " -"Python function." -msgstr "コマンドは、Pythonの関数と関連付けすることによって定義され、同様のシグネチャを使用してユーザーに呼び出されます。" - -#: ../../ext/commands/commands.rst:14 -msgid "For example, in the given command definition:" -msgstr "例えば、指定されたコマンド定義を使うと次のようになります。" - -#: ../../ext/commands/commands.rst:22 -msgid "With the following prefix (``$``), it would be invoked by the user via:" -msgstr "Prefixを (``$``) としたとすると、このコマンドは次の用に実行できます。" - -#: ../../ext/commands/commands.rst:28 -msgid "" -"A command must always have at least one parameter, ``ctx``, which is the " -":class:`.Context` as the first one." -msgstr "コマンドには、少なくとも :class:`.Context` を渡すための引数 ``ctx`` が必要です。" - -#: ../../ext/commands/commands.rst:30 -msgid "" -"There are two ways of registering a command. The first one is by using " -":meth:`.Bot.command` decorator, as seen in the example above. The second " -"is using the :func:`~ext.commands.command` decorator followed by " -":meth:`.Bot.add_command` on the instance." -msgstr "" -"コマンドを登録するには二通りの方法があります。一つ目は :meth:`.Bot.command` を使用する方法で、二つ目が " -":func:`~ext.commands.command` デコレータを使用して :meth:`.Bot.add_command` " -"でインスタンスにコマンドを追加していく方法です。" - -#: ../../ext/commands/commands.rst:34 -msgid "Essentially, these two are equivalent: ::" -msgstr "本質的に、これら2つは同等になります: ::" - -#: ../../ext/commands/commands.rst:52 -msgid "" -"Since the :meth:`.Bot.command` decorator is shorter and easier to " -"comprehend, it will be the one used throughout the documentation here." -msgstr ":meth:`.Bot.command` が簡単かつ理解がしやすいので、ドキュメント上ではこちらを使っています。" - -#: ../../ext/commands/commands.rst:55 -msgid "" -"Any parameter that is accepted by the :class:`.Command` constructor can " -"be passed into the decorator. For example, to change the name to " -"something other than the function would be as simple as doing this:" -msgstr "" -":class:`.Command` " -"のコンストラクタの引数はデコレータに渡すことで利用できます。例えば、コマンドの名前を関数以外のものへと変更したい場合は以下のように簡単に設定することができます。" - -#: ../../ext/commands/commands.rst:65 -msgid "Parameters" -msgstr "パラメーター" - -#: ../../ext/commands/commands.rst:67 -msgid "" -"Since we define commands by making Python functions, we also define the " -"argument passing behaviour by the function parameters." -msgstr "Pythonの関数定義によって、同時にコマンドを定義するので、関数のパラメーターを設定することにより、コマンドの引数受け渡し動作も定義することができます。" - -#: ../../ext/commands/commands.rst:70 -msgid "" -"Certain parameter types do different things in the user side and most " -"forms of parameter types are supported." -msgstr "特定のパラメータタイプはユーザーサイドで異なる動作を行い、そしてほとんどの形式のパラメータタイプがサポートされています。" - -#: ../../ext/commands/commands.rst:73 -msgid "Positional" -msgstr "位置引数" - -#: ../../ext/commands/commands.rst:75 -msgid "" -"The most basic form of parameter passing is the positional parameter. " -"This is where we pass a parameter as-is:" -msgstr "最も基本的な引数は位置パラメーターです。与えられた値をそのまま渡します。" - -#: ../../ext/commands/commands.rst:84 -msgid "" -"On the bot using side, you can provide positional arguments by just " -"passing a regular string:" -msgstr "Botの使用者側は、通常の文字列を渡すだけで位置引数に値を渡すことができます。" - -#: ../../ext/commands/commands.rst:88 -msgid "To make use of a word with spaces in between, you should quote it:" -msgstr "間に空白を含む文字列を渡す場合は、文字列を引用符で囲む必要があります。" - -#: ../../ext/commands/commands.rst:92 -msgid "" -"As a note of warning, if you omit the quotes, you will only get the first" -" word:" -msgstr "引用符を用いなかった場合、最初の文字列のみが渡されます。" - -#: ../../ext/commands/commands.rst:96 -msgid "" -"Since positional arguments are just regular Python arguments, you can " -"have as many as you want:" -msgstr "位置引数は、Pythonの引数と同じものなので、好きなだけ設定することが可能です。" - -#: ../../ext/commands/commands.rst:105 -msgid "Variable" -msgstr "可変長引数" - -#: ../../ext/commands/commands.rst:107 -msgid "" -"Sometimes you want users to pass in an undetermined number of parameters." -" The library supports this similar to how variable list parameters are " -"done in Python:" -msgstr "場合によっては、可変長のパラメーターを設定したい場合もあるでしょう。このライブラリはPythonの可変長パラメーターと同様にこれをサポートしています。" - -#: ../../ext/commands/commands.rst:116 -msgid "" -"This allows our user to accept either one or many arguments as they " -"please. This works similar to positional arguments, so multi-word " -"parameters should be quoted." -msgstr "これによって一つ、あるいは複数の引数を受け取ることができます。ただし、引数を渡す際の挙動は位置引数と同様のため、複数の単語を含む文字列は引用符で囲む必要があります。" - -#: ../../ext/commands/commands.rst:119 -msgid "For example, on the bot side:" -msgstr "例えば、Bot側ではこのように動きます。" - -#: ../../ext/commands/commands.rst:123 -msgid "" -"If the user wants to input a multi-word argument, they have to quote it " -"like earlier:" -msgstr "複数単語の文字列を渡す際は、引用符で囲んでください。" - -#: ../../ext/commands/commands.rst:127 -msgid "" -"Do note that similar to the Python function behaviour, a user can " -"technically pass no arguments at all:" -msgstr "Pythonの振る舞いと同様に、ユーザーは引数なしの状態を技術的に渡すことができます。" - -#: ../../ext/commands/commands.rst:132 -msgid "" -"Since the ``args`` variable is a :class:`py:tuple`, you can do anything " -"you would usually do with one." -msgstr "" - -#: ../../ext/commands/commands.rst:136 -msgid "Keyword-Only Arguments" -msgstr "キーワード引数" - -#: ../../ext/commands/commands.rst:138 -msgid "" -"When you want to handle parsing of the argument yourself or do not feel " -"like you want to wrap multi-word user input into quotes, you can ask the " -"library to give you the rest as a single argument. We do this by using a " -"**keyword-only argument**, seen below:" -msgstr "引数の構文解析を自分で行う場合や、複数単語の入力を引用符で囲む必要のないようにしたい場合は、渡された値を単一の引数として受け取るようにライブラリに求めることができます。以下のコードのようにキーワード引数のみを使用することでこれが可能になります。" - -#: ../../ext/commands/commands.rst:150 -msgid "You can only have one keyword-only argument due to parsing ambiguities." -msgstr "解析が曖昧になるため、一つのキーワードのみの引数しか扱えません。" - -#: ../../ext/commands/commands.rst:152 -msgid "On the bot side, we do not need to quote input with spaces:" -msgstr "Bot側では、スペースを含む入力を引用符で囲む必要がありません:" - -#: ../../ext/commands/commands.rst:156 -msgid "Do keep in mind that wrapping it in quotes leaves it as-is:" -msgstr "引用符で囲んだ場合、消えずに残るので注意してください:" - -#: ../../ext/commands/commands.rst:160 -msgid "" -"By default, the keyword-only arguments are stripped of white space to " -"make it easier to work with. This behaviour can be toggled by the " -":attr:`.Command.rest_is_raw` argument in the decorator." -msgstr "" -"通常、キーワード引数は利便性のために空白文字で分割されます。この動作はデコレータの引数として " -":attr:`.Command.rest_is_raw` を使うことで切り替えることが可能です。" - -#: ../../ext/commands/commands.rst:166 -msgid "Invocation Context" -msgstr "呼び出しコンテクスト" - -#: ../../ext/commands/commands.rst:168 -msgid "" -"As seen earlier, every command must take at least a single parameter, " -"called the :class:`~ext.commands.Context`." -msgstr "前述の通り、すべてのコマンドは必ず :class:`~ext.commands.Context` と呼ばれるパラメータを受け取らなければいけません。" - -#: ../../ext/commands/commands.rst:170 -msgid "" -"This parameter gives you access to something called the \"invocation " -"context\". Essentially all the information you need to know how the " -"command was executed. It contains a lot of useful information:" -msgstr "このパラメータにより、「呼び出しコンテクスト」というものにアクセスできます。言うなればコマンドがどのように実行されたのかを知るのに必要な基本的情報です。これにはたくさんの有用な情報が含まれています。" - -#: ../../ext/commands/commands.rst:173 -msgid ":attr:`.Context.guild` to fetch the :class:`Guild` of the command, if any." -msgstr "存在する場合に限り、コマンドの :class:`Guild` を取得できる :attr:`.Context.guild` 。" - -#: ../../ext/commands/commands.rst:174 -msgid ":attr:`.Context.message` to fetch the :class:`Message` of the command." -msgstr "コマンドの :class:`Message` を取得できる :attr:`.Context.message` 。" - -#: ../../ext/commands/commands.rst:175 -msgid "" -":attr:`.Context.author` to fetch the :class:`Member` or :class:`User` " -"that called the command." -msgstr "" -"コマンドを実行した :class:`Member` あるいは :class:`User` を取得できる " -":attr:`.Context.author` 。" - -#: ../../ext/commands/commands.rst:176 -msgid "" -":meth:`.Context.send` to send a message to the channel the command was " -"used in." -msgstr "コマンドが実行されたチャンネルにメッセージを送信する :meth:`.Context.send` 。" - -#: ../../ext/commands/commands.rst:178 -msgid "" -"The context implements the :class:`abc.Messageable` interface, so " -"anything you can do on a :class:`abc.Messageable` you can do on the " -":class:`~ext.commands.Context`." -msgstr "" -"コンテクストは :class:`abc.Messageable` インタフェースを実装しているため、 " -":class:`abc.Messageable` 上でできることは :class:`~ext.commands.Context` " -"上でも行うことが可能です。" - -#: ../../ext/commands/commands.rst:182 -msgid "Converters" -msgstr "コンバータ" - -#: ../../ext/commands/commands.rst:184 -msgid "" -"Adding bot arguments with function parameters is only the first step in " -"defining your bot's command interface. To actually make use of the " -"arguments, we usually want to convert the data into a target type. We " -"call these :ref:`ext_commands_api_converters`." -msgstr "" -"Botの引数を関数のパラメータとして設定するのは、Botのコマンドインタフェースを定義する第一歩です。引数を実際に扱うには、大抵の場合、データを目的の型へとと変換する必要があります。私達はこれを" -" :ref:`ext_commands_api_converters` と呼んでいます。" - -#: ../../ext/commands/commands.rst:188 -msgid "Converters come in a few flavours:" -msgstr "コンバータにはいくつかの種類があります:" - -#: ../../ext/commands/commands.rst:190 -msgid "" -"A regular callable object that takes an argument as a sole parameter and " -"returns a different type." -msgstr "引数を一つのパラメータとして受け取り、異なる型として返す、通常の呼び出し可能オブジェクト。" - -#: ../../ext/commands/commands.rst:192 -msgid "" -"These range from your own function, to something like :class:`bool` or " -":class:`int`." -msgstr "これらにはあなたの作った関数、 :class:`bool` や :class:`int` といったものまで含まれます。" - -#: ../../ext/commands/commands.rst:194 -msgid "A custom class that inherits from :class:`~ext.commands.Converter`." -msgstr ":class:`~ext.commands.Converter` を継承したカスタムクラス。" - -#: ../../ext/commands/commands.rst:197 -msgid "Basic Converters" -msgstr "基本的なコンバーター" - -#: ../../ext/commands/commands.rst:199 -msgid "" -"At its core, a basic converter is a callable that takes in an argument " -"and turns it into something else." -msgstr "基本的なコンバーターは、中核をなすものであり、受け取った引数を別のものへと変換します。" - -#: ../../ext/commands/commands.rst:201 -msgid "" -"For example, if we wanted to add two numbers together, we could request " -"that they are turned into integers for us by specifying the converter:" -msgstr "例えば、二つの値を加算したい場合、コンバーターを指定することにより、受け取った値を整数型へ変換するように要求できます。" - -#: ../../ext/commands/commands.rst:210 -msgid "" -"We specify converters by using something called a **function " -"annotation**. This is a Python 3 exclusive feature that was introduced in" -" :pep:`3107`." -msgstr "" -"コンバーターの指定には関数アノテーションというもの用います。これは :pep:`3107` にて追加された Python 3 " -"にのみ実装されている機能です。" - -#: ../../ext/commands/commands.rst:213 -msgid "" -"This works with any callable, such as a function that would convert a " -"string to all upper-case:" -msgstr "これは、文字列をすべて大文字に変換する関数などといった、任意の呼び出し可能関数でも動作します。" - -#: ../../ext/commands/commands.rst:225 -msgid "bool" -msgstr "論理型" - -#: ../../ext/commands/commands.rst:227 -#, fuzzy -msgid "" -"Unlike the other basic converters, the :class:`bool` converter is treated" -" slightly different. Instead of casting directly to the :class:`bool` " -"type, which would result in any non-empty argument returning ``True``, it" -" instead evaluates the argument as ``True`` or ``False`` based on its " -"given content:" -msgstr "" -"他の基本的なコンバーターとは異なり、 :class:`bool` のコンバーターは若干異なる扱いになります。 :class:`bool` " -"型に直接キャストする代わりに、与えられた値に基づいて ``True`` か ``False`` を返します。" - -#: ../../ext/commands/commands.rst:239 -msgid "Advanced Converters" -msgstr "応用的なコンバータ" - -#: ../../ext/commands/commands.rst:241 -msgid "" -"Sometimes a basic converter doesn't have enough information that we need." -" For example, sometimes we want to get some information from the " -":class:`Message` that called the command or we want to do some " -"asynchronous processing." -msgstr "" -"場合によっては、基本的なコンバータを動かすのに必要な情報が不足していることがあります。例えば、実行されたコマンドの " -":class:`Message` から情報を取得したい場合や、非同期処理を行いたい場合です。" - -#: ../../ext/commands/commands.rst:244 -msgid "" -"For this, the library provides the :class:`~ext.commands.Converter` " -"interface. This allows you to have access to the :class:`.Context` and " -"have the callable be asynchronous. Defining a custom converter using this" -" interface requires overriding a single method, " -":meth:`.Converter.convert`." -msgstr "" -"そういった用途のために、このライブラリは :class:`~ext.commands.Converter` " -"インタフェースを提供します。これによって :class:`.Context` " -"にアクセスが可能になり、また、呼び出し可能関数を非同期にもできるようになります。このインタフェースを使用して、カスタムコンバーターを定義したい場合は" -" :meth:`.Converter.convert` をオーバーライドしてください。" - -#: ../../ext/commands/commands.rst:248 -msgid "An example converter:" -msgstr "コンバーターの例" - -#: ../../ext/commands/commands.rst:263 -msgid "" -"The converter provided can either be constructed or not. Essentially " -"these two are equivalent:" -msgstr "コンバーターはインスタンス化されていなくても構いません。以下の例の二つのは同じ処理になります。" - -#: ../../ext/commands/commands.rst:277 -msgid "" -"Having the possibility of the converter be constructed allows you to set " -"up some state in the converter's ``__init__`` for fine tuning the " -"converter. An example of this is actually in the library, " -":class:`~ext.commands.clean_content`." -msgstr "" -"コンバーターをインスタンス化する可能性がある場合、コンバーターの調整を行うために ``__init__`` " -"で何かしらの状態を設定することが出来ます。この例としてライブラリに実際に存在する " -":class:`~ext.commands.clean_content` があります。" - -#: ../../ext/commands/commands.rst:293 -msgid "" -"If a converter fails to convert an argument to its designated target " -"type, the :exc:`.BadArgument` exception must be raised." -msgstr "コンバーターが渡された引数を指定の型に変換できなかった場合は :exc:`.BadArgument` を発生させてください。" - -#: ../../ext/commands/commands.rst:297 -msgid "Inline Advanced Converters" -msgstr "埋込み型の応用的なコンバーター" - -#: ../../ext/commands/commands.rst:299 -msgid "" -"If we don't want to inherit from :class:`~ext.commands.Converter`, we can" -" still provide a converter that has the advanced functionalities of an " -"advanced converter and save us from specifying two types." -msgstr "" -":class:`~ext.commands.Converter` " -"を継承したくない場合のために、応用的なコンバータの高度な機能を備えたコンバータを提供しています。これを使用することで2つのクラスを作成する必要がなくなります。" - -#: ../../ext/commands/commands.rst:302 -msgid "" -"For example, a common idiom would be to have a class and a converter for " -"that class:" -msgstr "例えば、一般的な書き方だと、クラスとそのクラスへのコンバーターを定義します:" - -#: ../../ext/commands/commands.rst:328 -msgid "" -"This can get tedious, so an inline advanced converter is possible through" -" a ``classmethod`` inside the type:" -msgstr "" -"これでは面倒に感じてしまうこともあるでしょう。しかし、埋込み型の応用的なコンバーターは ``classmethod`` " -"としてクラスへ埋め込むことが可能です:" - -#: ../../ext/commands/commands.rst:355 -msgid "Discord Converters" -msgstr "Discord コンバーター" - -#: ../../ext/commands/commands.rst:357 -msgid "" -"Working with :ref:`discord_api_models` is a fairly common thing when " -"defining commands, as a result the library makes working with them easy." -msgstr "" -":ref:`discord_api_models` " -"を使用して作業を行うのは、コマンドを定義する際には一般的なことです。そのため、このライブラリでは簡単に作業が行えるようになっています。" - -#: ../../ext/commands/commands.rst:360 -msgid "" -"For example, to receive a :class:`Member` you can just pass it as a " -"converter:" -msgstr "例えば、 :class:`Member` を受け取るには、これをコンバーターとして渡すだけです。" - -#: ../../ext/commands/commands.rst:368 -msgid "" -"When this command is executed, it attempts to convert the string given " -"into a :class:`Member` and then passes it as a parameter for the " -"function. This works by checking if the string is a mention, an ID, a " -"nickname, a username + discriminator, or just a regular username. The " -"default set of converters have been written to be as easy to use as " -"possible." -msgstr "" -"このコマンドが実行されると、与えられた文字列を :class:`Member` " -"に変換して、それを関数のパラメーターとして渡します。これは文字列がメンション、ID、ニックネーム、ユーザー名 + " -"Discordタグ、または普通のユーザー名かどうかをチェックすることで機能しています。デフォルトで定義されているコンバーターは、できるだけ簡単に使えるように作られています。" - -#: ../../ext/commands/commands.rst:372 -msgid "A lot of discord models work out of the gate as a parameter:" -msgstr "Discordモデルの多くがコンバーターとして動作します。" - -#: ../../ext/commands/commands.rst:374 ../../ext/commands/commands.rst:396 -msgid ":class:`Member`" -msgstr ":class:`Member`" - -#: ../../ext/commands/commands.rst:375 ../../ext/commands/commands.rst:400 -msgid ":class:`User`" -msgstr ":class:`User`" - -#: ../../ext/commands/commands.rst:376 ../../ext/commands/commands.rst:402 -msgid ":class:`TextChannel`" -msgstr ":class:`TextChannel`" - -#: ../../ext/commands/commands.rst:377 ../../ext/commands/commands.rst:404 -msgid ":class:`VoiceChannel`" -msgstr ":class:`VoiceChannel`" - -#: ../../ext/commands/commands.rst:378 ../../ext/commands/commands.rst:406 -msgid ":class:`CategoryChannel`" -msgstr ":class:`CategoryChannel`" - -#: ../../ext/commands/commands.rst:379 ../../ext/commands/commands.rst:408 -msgid ":class:`Role`" -msgstr ":class:`Role`" - -#: ../../ext/commands/commands.rst:380 -msgid ":class:`Message` (since v1.1)" -msgstr ":class:`Message` (v1.1 から)" - -#: ../../ext/commands/commands.rst:381 ../../ext/commands/commands.rst:410 -msgid ":class:`Invite`" -msgstr ":class:`Invite`" - -#: ../../ext/commands/commands.rst:382 ../../ext/commands/commands.rst:412 -msgid ":class:`Game`" -msgstr ":class:`Game`" - -#: ../../ext/commands/commands.rst:383 ../../ext/commands/commands.rst:414 -msgid ":class:`Emoji`" -msgstr ":class:`Emoji`" - -#: ../../ext/commands/commands.rst:384 ../../ext/commands/commands.rst:416 -msgid ":class:`PartialEmoji`" -msgstr ":class:`PartialEmoji`" - -#: ../../ext/commands/commands.rst:385 ../../ext/commands/commands.rst:418 -msgid ":class:`Colour`" -msgstr ":class:`Colour`" - -#: ../../ext/commands/commands.rst:387 -msgid "" -"Having any of these set as the converter will intelligently convert the " -"argument to the appropriate target type you specify." -msgstr "これらをコンバーターとして設定すると、引数を指定した型へとインテリジェントに変換します。" - -#: ../../ext/commands/commands.rst:390 -msgid "" -"Under the hood, these are implemented by the " -":ref:`ext_commands_adv_converters` interface. A table of the equivalent " -"converter is given below:" -msgstr "" -"これらは :ref:`ext_commands_adv_converters` " -"インタフェースによって実装されています。コンバーターとクラスの関係は以下の通りです。" - -#: ../../ext/commands/commands.rst:394 -msgid "Discord Class" -msgstr "Discord クラス" - -#: ../../ext/commands/commands.rst:394 -msgid "Converter" -msgstr "コンバーター" - -#: ../../ext/commands/commands.rst:396 -msgid ":class:`~ext.commands.MemberConverter`" -msgstr ":class:`~ext.commands.MemberConverter`" - -#: ../../ext/commands/commands.rst:398 -msgid ":class:`Message`" -msgstr ":class:`Message`" - -#: ../../ext/commands/commands.rst:398 -msgid ":class:`~ext.commands.MessageConverter`" -msgstr ":class:`~ext.commands.MessageConverter`" - -#: ../../ext/commands/commands.rst:400 -msgid ":class:`~ext.commands.UserConverter`" -msgstr ":class:`~ext.commands.UserConverter`" - -#: ../../ext/commands/commands.rst:402 -msgid ":class:`~ext.commands.TextChannelConverter`" -msgstr ":class:`~ext.commands.TextChannelConverter`" - -#: ../../ext/commands/commands.rst:404 -msgid ":class:`~ext.commands.VoiceChannelConverter`" -msgstr ":class:`~ext.commands.VoiceChannelConverter`" - -#: ../../ext/commands/commands.rst:406 -msgid ":class:`~ext.commands.CategoryChannelConverter`" -msgstr ":class:`~ext.commands.CategoryChannelConverter`" - -#: ../../ext/commands/commands.rst:408 -msgid ":class:`~ext.commands.RoleConverter`" -msgstr ":class:`~ext.commands.RoleConverter`" - -#: ../../ext/commands/commands.rst:410 -msgid ":class:`~ext.commands.InviteConverter`" -msgstr ":class:`~ext.commands.InviteConverter`" - -#: ../../ext/commands/commands.rst:412 -msgid ":class:`~ext.commands.GameConverter`" -msgstr ":class:`~ext.commands.GameConverter`" - -#: ../../ext/commands/commands.rst:414 -msgid ":class:`~ext.commands.EmojiConverter`" -msgstr ":class:`~ext.commands.EmojiConverter`" - -#: ../../ext/commands/commands.rst:416 -msgid ":class:`~ext.commands.PartialEmojiConverter`" -msgstr ":class:`~ext.commands.PartialEmojiConverter`" - -#: ../../ext/commands/commands.rst:418 -msgid ":class:`~ext.commands.ColourConverter`" -msgstr ":class:`~ext.commands.ColourConverter`" - -#: ../../ext/commands/commands.rst:421 -msgid "" -"By providing the converter it allows us to use them as building blocks " -"for another converter:" -msgstr "コンバーターを継承することで、他のコンバーターの一部として使うことができます:" - -#: ../../ext/commands/commands.rst:438 -msgid "Special Converters" -msgstr "特殊なコンバーター" - -#: ../../ext/commands/commands.rst:440 -msgid "" -"The command extension also has support for certain converters to allow " -"for more advanced and intricate use cases that go beyond the generic " -"linear parsing. These converters allow you to introduce some more relaxed" -" and dynamic grammar to your commands in an easy to use manner." -msgstr "コマンド拡張機能は一般的な線形解析を超える、より高度で複雑なユースケースに対応するため、特殊なコンバータをサポートしています。これらのコンバータは、簡単な方法でコマンドに更に容易で動的な文法の導入を可能にします。" - -#: ../../ext/commands/commands.rst:445 -msgid "typing.Union" -msgstr "typing.Union" - -#: ../../ext/commands/commands.rst:447 -msgid "" -"A :data:`typing.Union` is a special type hint that allows for the command" -" to take in any of the specific types instead of a singular type. For " -"example, given the following:" -msgstr ":data:`typing.Union` はコマンドが単数の型の代わりに、複数の特定の型を取り込める特殊な型ヒントです。例えば:" - -#: ../../ext/commands/commands.rst:459 -msgid "" -"The ``what`` parameter would either take a :class:`discord.TextChannel` " -"converter or a :class:`discord.Member` converter. The way this works is " -"through a left-to-right order. It first attempts to convert the input to " -"a :class:`discord.TextChannel`, and if it fails it tries to convert it to" -" a :class:`discord.Member`. If all converters fail, then a special error " -"is raised, :exc:`~ext.commands.BadUnionArgument`." -msgstr "" -"``what`` パラメータには :class:`discord.TextChannel` コンバーターか " -":class:`discord.Member` " -"コンバーターのいずれかが用いられます。これは左から右の順で変換できるか試行することになります。最初に渡された値を " -":class:`discord.TextChannel` へ変換しようと試み、失敗した場合は :class:`discord.Member` " -"に変換しようとします。すべてのコンバーターで失敗した場合は :exc:`~ext.commands.BadUnionArgument` " -"というエラーが発生します。" - -#: ../../ext/commands/commands.rst:464 -msgid "" -"Note that any valid converter discussed above can be passed in to the " -"argument list of a :data:`typing.Union`." -msgstr "以前に説明した有効なコンバーターは、すべて :data:`typing.Union` にわたすことが可能です。" - -#: ../../ext/commands/commands.rst:467 -msgid "typing.Optional" -msgstr "typing.Optional" - -#: ../../ext/commands/commands.rst:469 -msgid "" -"A :data:`typing.Optional` is a special type hint that allows for \"back-" -"referencing\" behaviour. If the converter fails to parse into the " -"specified type, the parser will skip the parameter and then either " -"``None`` or the specified default will be passed into the parameter " -"instead. The parser will then continue on to the next parameters and " -"converters, if any." -msgstr "" -":data:`typing.Optional` " -"は「後方参照」のような動作をする特殊な型ヒントです。コンバーターが指定された型へのパースに失敗した場合、パーサーは代わりに ``None`` " -"または指定されたデフォルト値をパラメータに渡したあと、そのパラメータをスキップします。次のパラメータまたはコンバータがあれば、そちらに進みます。" - -#: ../../ext/commands/commands.rst:473 ../../ext/commands/commands.rst:500 -msgid "Consider the following example:" -msgstr "次の例をみてください:" - -#: ../../ext/commands/commands.rst:486 -msgid "" -"In this example, since the argument could not be converted into an " -"``int``, the default of ``99`` is passed and the parser resumes handling," -" which in this case would be to pass it into the ``liquid`` parameter." -msgstr "" -"この例では引数を ``int`` に変換することができなかったので、デフォルト値である ``99`` " -"を代入し、パーサーは処理を続行しています。この場合、先程の変換に失敗した引数は ``liquid`` パラメータに渡されます。" - -#: ../../ext/commands/commands.rst:491 -msgid "" -"This converter only works in regular positional parameters, not variable " -"parameters or keyword-only parameters." -msgstr "このコンバーターは位置パラメータでのみ動作し、可変長パラメータやキーワードパラメータでは機能しません。" - -#: ../../ext/commands/commands.rst:494 -msgid "Greedy" -msgstr "Greedy" - -#: ../../ext/commands/commands.rst:496 -msgid "" -"The :data:`~ext.commands.Greedy` converter is a generalisation of the " -":data:`typing.Optional` converter, except applied to a list of arguments." -" In simple terms, this means that it tries to convert as much as it can " -"until it can't convert any further." -msgstr "" -":data:`~ext.commands.Greedy` コンバータは引数にリストが適用される以外は " -":data:`typing.Optional` " -"を一般化したものです。簡単に言うと、与えられた引数を変換ができなくなるまで指定の型に変換しようと試みます。" - -#: ../../ext/commands/commands.rst:509 -msgid "When invoked, it allows for any number of members to be passed in:" -msgstr "これが呼び出されると、任意の数のメンバーを渡すことができます:" - -#: ../../ext/commands/commands.rst:513 -msgid "" -"The type passed when using this converter depends on the parameter type " -"that it is being attached to:" -msgstr "" - -#: ../../ext/commands/commands.rst:515 -msgid "" -"Positional parameter types will receive either the default parameter or a" -" :class:`list` of the converted values." -msgstr "" - -#: ../../ext/commands/commands.rst:516 -msgid "Variable parameter types will be a :class:`tuple` as usual." -msgstr "" - -#: ../../ext/commands/commands.rst:517 -msgid "" -"Keyword-only parameter types will be the same as if " -":data:`~ext.commands.Greedy` was not passed at all." -msgstr "" - -#: ../../ext/commands/commands.rst:519 -msgid "" -":data:`~ext.commands.Greedy` parameters can also be made optional by " -"specifying an optional value." -msgstr "" - -#: ../../ext/commands/commands.rst:521 -msgid "" -"When mixed with the :data:`typing.Optional` converter you can provide " -"simple and expressive command invocation syntaxes:" -msgstr "" - -#: ../../ext/commands/commands.rst:536 -msgid "This command can be invoked any of the following ways:" -msgstr "" - -#: ../../ext/commands/commands.rst:546 -msgid "" -"The usage of :data:`~ext.commands.Greedy` and :data:`typing.Optional` are" -" powerful and useful, however as a price, they open you up to some " -"parsing ambiguities that might surprise some people." -msgstr "" - -#: ../../ext/commands/commands.rst:549 -msgid "" -"For example, a signature expecting a :data:`typing.Optional` of a " -":class:`discord.Member` followed by a :class:`int` could catch a member " -"named after a number due to the different ways a " -":class:`~ext.commands.MemberConverter` decides to fetch members. You " -"should take care to not introduce unintended parsing ambiguities in your " -"code. One technique would be to clamp down the expected syntaxes allowed " -"through custom converters or reordering the parameters to minimise " -"clashes." -msgstr "" - -#: ../../ext/commands/commands.rst:555 -msgid "" -"To help aid with some parsing ambiguities, :class:`str`, ``None``, " -":data:`typing.Optional` and :data:`~ext.commands.Greedy` are forbidden as" -" parameters for the :data:`~ext.commands.Greedy` converter." -msgstr "" - -#: ../../ext/commands/commands.rst:561 -msgid "Error Handling" -msgstr "エラーハンドリング" - -#: ../../ext/commands/commands.rst:563 -#, fuzzy -msgid "" -"When our commands fail to parse we will, by default, receive a noisy " -"error in ``stderr`` of our console that tells us that an error has " -"happened and has been silently ignored." -msgstr "" -"コマンドの解析に失敗したとき、通常では煩わしいエラーはエラーの発生を伝えるためにコンソールの ``stderr`` " -"で受け取られ、無視されていました。" - -#: ../../ext/commands/commands.rst:566 -msgid "" -"In order to handle our errors, we must use something called an error " -"handler. There is a global error handler, called :func:`on_command_error`" -" which works like any other event in the :ref:`discord-api-events`. This " -"global error handler is called for every error reached." -msgstr "" - -#: ../../ext/commands/commands.rst:570 -msgid "" -"Most of the time however, we want to handle an error local to the command" -" itself. Luckily, commands come with local error handlers that allow us " -"to do just that. First we decorate an error handler function with " -":meth:`.Command.error`:" -msgstr "" - -#: ../../ext/commands/commands.rst:586 -msgid "" -"The first parameter of the error handler is the :class:`.Context` while " -"the second one is an exception that is derived from " -":exc:`~ext.commands.CommandError`. A list of errors is found in the " -":ref:`ext_commands_api_errors` page of the documentation." -msgstr "" - -#: ../../ext/commands/commands.rst:590 -msgid "Checks" -msgstr "チェック" - -#: ../../ext/commands/commands.rst:592 -msgid "" -"There are cases when we don't want a user to use our commands. They don't" -" have permissions to do so or maybe we blocked them from using our bot " -"earlier. The commands extension comes with full support for these things " -"in a concept called a :ref:`ext_commands_api_checks`." -msgstr "" -"コマンドをユーザーに使ってほしくない場合などがあります。例えば、使用者が権限を持っていない場合や、Botをブロックしている場合などです。コマンド拡張ではこのような機能を" -" :ref:`ext_commands_api_checks` と呼び、完全にサポートしています。" - -#: ../../ext/commands/commands.rst:596 -msgid "" -"A check is a basic predicate that can take in a :class:`.Context` as its " -"sole parameter. Within it, you have the following options:" -msgstr "" - -#: ../../ext/commands/commands.rst:599 -msgid "Return ``True`` to signal that the person can run the command." -msgstr "" - -#: ../../ext/commands/commands.rst:600 -msgid "Return ``False`` to signal that the person cannot run the command." -msgstr "" - -#: ../../ext/commands/commands.rst:601 -msgid "" -"Raise a :exc:`~ext.commands.CommandError` derived exception to signal the" -" person cannot run the command." -msgstr "" - -#: ../../ext/commands/commands.rst:603 -msgid "" -"This allows you to have custom error messages for you to handle in the " -":ref:`error handlers `." -msgstr "" - -#: ../../ext/commands/commands.rst:606 -msgid "" -"To register a check for a command, we would have two ways of doing so. " -"The first is using the :meth:`~ext.commands.check` decorator. For " -"example:" -msgstr "" - -#: ../../ext/commands/commands.rst:620 -msgid "" -"This would only evaluate the command if the function ``is_owner`` returns" -" ``True``. Sometimes we re-use a check often and want to split it into " -"its own decorator. To do that we can just add another level of depth:" -msgstr "" - -#: ../../ext/commands/commands.rst:637 -msgid "" -"Since an owner check is so common, the library provides it for you " -"(:func:`~ext.commands.is_owner`):" -msgstr "" - -#: ../../ext/commands/commands.rst:647 -msgid "When multiple checks are specified, **all** of them must be ``True``:" -msgstr "" - -#: ../../ext/commands/commands.rst:663 -msgid "" -"If any of those checks fail in the example above, then the command will " -"not be run." -msgstr "" - -#: ../../ext/commands/commands.rst:665 -msgid "" -"When an error happens, the error is propagated to the :ref:`error " -"handlers `. If you do not raise a custom " -":exc:`~ext.commands.CommandError` derived exception, then it will get " -"wrapped up into a :exc:`~ext.commands.CheckFailure` exception as so:" -msgstr "" - -#: ../../ext/commands/commands.rst:683 -msgid "" -"If you want a more robust error system, you can derive from the exception" -" and raise it instead of returning ``False``:" -msgstr "" - -#: ../../ext/commands/commands.rst:708 -msgid "" -"Since having a ``guild_only`` decorator is pretty common, it comes built-" -"in via :func:`~ext.commands.guild_only`." -msgstr "" - -#: ../../ext/commands/commands.rst:711 -msgid "Global Checks" -msgstr "グローバルチェック" - -#: ../../ext/commands/commands.rst:713 -msgid "" -"Sometimes we want to apply a check to **every** command, not just certain" -" commands. The library supports this as well using the global check " -"concept." -msgstr "" - -#: ../../ext/commands/commands.rst:716 -msgid "" -"Global checks work similarly to regular checks except they are registered" -" with the :func:`.Bot.check` decorator." -msgstr "" - -#: ../../ext/commands/commands.rst:718 -msgid "For example, to block all DMs we could do the following:" -msgstr "" - -#: ../../ext/commands/commands.rst:728 -msgid "" -"Be careful on how you write your global checks, as it could also lock you" -" out of your own bot." -msgstr "" - -#~ msgid "" -#~ "To help aid with some parsing " -#~ "ambiguities, :class:`str`, ``None`` and " -#~ ":data:`~ext.commands.Greedy` are forbidden as " -#~ "parameters for the :data:`~ext.commands.Greedy` " -#~ "converter." -#~ msgstr "" - diff --git a/docs/locale/ja/LC_MESSAGES/ext/commands/extensions.po b/docs/locale/ja/LC_MESSAGES/ext/commands/extensions.po deleted file mode 100644 index d4bf7e88..00000000 --- a/docs/locale/ja/LC_MESSAGES/ext/commands/extensions.po +++ /dev/null @@ -1,83 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: /ext/commands/extensions.pot\n" -"X-Crowdin-File-ID: 68\n" -"Language: ja_JP\n" - -#: ../../ext/commands/extensions.rst:6 -msgid "Extensions" -msgstr "エクステンション" - -#: ../../ext/commands/extensions.rst:8 -msgid "There comes a time in the bot development when you want to extend the bot functionality at run-time and quickly unload and reload code (also called hot-reloading). The command framework comes with this ability built-in, with a concept called **extensions**." -msgstr "Bot開発ではBotを起動している間にコードを素早くアンロードし、再度ロードし直したい (ホットリロードとも呼ばれます) という時があります。コマンドフレームワークでは **エクステンション** と呼ばれる概念でこの機能が組み込まれています。" - -#: ../../ext/commands/extensions.rst:11 -msgid "Primer" -msgstr "はじめに" - -#: ../../ext/commands/extensions.rst:13 -msgid "An extension at its core is a python file with an entry point called ``setup``. This setup must be a plain Python function (not a coroutine). It takes a single parameter -- the :class:`~.commands.Bot` that loads the extension." -msgstr "その中核となるエクステンションは ``setup`` というエントリポイントを持つPythonファイルです。このsetupは通常のPython関数である必要があります (コルーチンではありません)。この関数はエクステンションをロードする :class:`~.commands.Bot` を受け取るための単一のパラメータを持ちます。" - -#: ../../ext/commands/extensions.rst:15 -msgid "An example extension looks like this:" -msgstr "エクステンションの例は以下のとおりです:" - -#: ../../ext/commands/extensions.rst:17 -msgid "hello.py" -msgstr "hello.py" - -#: ../../ext/commands/extensions.rst:30 -msgid "In this example we define a simple command, and when the extension is loaded this command is added to the bot. Now the final step to this is loading the extension, which we do by calling :meth:`.commands.Bot.load_extension`. To load this extension we call ``bot.load_extension('hello')``." -msgstr "この例では単純なコマンドを実装しており、エクステンションがロードされることでこのコマンドがBotに追加されます。最後にこのエクステンションをロードする必要があります。ロードには :meth:`.commands.Bot.load_extension` を実行します。このエクステンションを読み込むために ``bot.load_extension('hello')`` を実行します。" - -#: ../../ext/commands/extensions.rst:32 -msgid "Cogs" -msgstr "コグ" - -#: ../../ext/commands/extensions.rst:35 -msgid "Extensions are usually used in conjunction with cogs. To read more about them, check out the documentation, :ref:`ext_commands_cogs`." -msgstr "エクステンションは通常、コグと組み合わせて使用します。詳細については :ref:`ext_commands_cogs` のドキュメントを参照してください。" - -#: ../../ext/commands/extensions.rst:39 -msgid "Extension paths are ultimately similar to the import mechanism. What this means is that if there is a folder, then it must be dot-qualified. For example to load an extension in ``plugins/hello.py`` then we use the string ``plugins.hello``." -msgstr "エクステンションのパスは究極的にはimportのメカニズムと似ています。これはフォルダ等がある場合、それをドットで区切らなければならないということです。例えば ``plugins/hello.py`` というエクステンションをロードする場合は、 ``plugins.hello`` という文字列を使います。" - -#: ../../ext/commands/extensions.rst:42 -msgid "Reloading" -msgstr "リロード" - -#: ../../ext/commands/extensions.rst:44 -msgid "When you make a change to the extension and want to reload the references, the library comes with a function to do this for you, :meth:`Bot.reload_extension`." -msgstr "エクステンションを更新し、その参照を再読込したい場合のために、ライブラリには :meth:`Bot.reload_extension` が用意されています。" - -#: ../../ext/commands/extensions.rst:50 -msgid "Once the extension reloads, any changes that we did will be applied. This is useful if we want to add or remove functionality without restarting our bot. If an error occurred during the reloading process, the bot will pretend as if the reload never happened." -msgstr "エクステンションを再読込すると、その変更が適用されます。Botを再起動せずに機能の追加や削除を行いたい場合に便利です。再読込処理中にエラーが発生した場合、Botは再読込処理をする前の状態に戻ります。" - -#: ../../ext/commands/extensions.rst:53 -msgid "Cleaning Up" -msgstr "クリーンアップ" - -#: ../../ext/commands/extensions.rst:55 -msgid "Although rare, sometimes an extension needs to clean-up or know when it's being unloaded. For cases like these, there is another entry point named ``teardown`` which is similar to ``setup`` except called when the extension is unloaded." -msgstr "稀ではありますが、エクステンションにクリーンアップが必要だったり、いつアンロードするかを確認したい場合があります。このために ``setup`` に似たエクステンションがアンロードされるときに呼び出される ``teardown`` というエントリポイントが用意されています。" - -#: ../../ext/commands/extensions.rst:57 -msgid "basic_ext.py" -msgstr "basic_ext.py" - diff --git a/docs/locale/ja/LC_MESSAGES/ext/commands/index.po b/docs/locale/ja/LC_MESSAGES/ext/commands/index.po deleted file mode 100644 index 2f65fa04..00000000 --- a/docs/locale/ja/LC_MESSAGES/ext/commands/index.po +++ /dev/null @@ -1,27 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: /ext/commands/index.pot\n" -"X-Crowdin-File-ID: 66\n" -"Language: ja_JP\n" - -#: ../../ext/commands/index.rst:4 -msgid "``discord.ext.commands`` -- Bot commands framework" -msgstr "``discord.ext.commands`` -- ボットコマンドのフレームワーク" - -#: ../../ext/commands/index.rst:6 -msgid "``discord.py`` offers a lower level aspect on interacting with Discord. Often times, the library is used for the creation of bots. However this task can be daunting and confusing to get correctly the first time. Many times there comes a repetition in creating a bot command framework that is extensible, flexible, and powerful. For this reason, ``discord.py`` comes with an extension library that handles this for you." -msgstr "``discord.py`` は、Discordと連携するための低レベルな機能を提供します。ときどき、このライブラリーはBotの作成に用いられています。しかしこの作業を正しくやるのは最初のときは気が重くややこしいものです。何度も繰り返し、拡張可能で柔軟、そしてパワフルなBotコマンドフレームワークを作成しています。この理由より、 ``discord.py`` にはこれを扱う拡張ライブラリがついてきます。" - diff --git a/docs/locale/ja/LC_MESSAGES/ext/tasks/index.po b/docs/locale/ja/LC_MESSAGES/ext/tasks/index.po deleted file mode 100644 index bf76ebcc..00000000 --- a/docs/locale/ja/LC_MESSAGES/ext/tasks/index.po +++ /dev/null @@ -1,417 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../ext/tasks/index.rst:4 -msgid "``discord.ext.tasks`` -- asyncio.Task helpers" -msgstr "``discord.ext.tasks`` -- asyncio.Task ヘルパー" - -#: ../../ext/tasks/index.rst:8 -msgid "" -"One of the most common operations when making a bot is having a loop run " -"in the background at a specified interval. This pattern is very common " -"but has a lot of things you need to look out for:" -msgstr "ボットを作成するときの最も一般的な操作の1つは、指定した間隔でバックグラウンドでループを実行させることです。このパターンは非常に一般的ですが、注意すべきことがたくさんあります。" - -#: ../../ext/tasks/index.rst:10 -msgid "How do I handle :exc:`asyncio.CancelledError`?" -msgstr ":exc:`asyncio.CancelledError` はどのように処理するべきですか?" - -#: ../../ext/tasks/index.rst:11 -msgid "What do I do if the internet goes out?" -msgstr "インターネット接続が切れた場合はどうするべきですか?" - -#: ../../ext/tasks/index.rst:12 -msgid "What is the maximum number of seconds I can sleep anyway?" -msgstr "スリープできる最大時間は何秒ですか?" - -#: ../../ext/tasks/index.rst:14 -msgid "" -"The goal of this discord.py extension is to abstract all these worries " -"away from you." -msgstr "discord.pyの拡張機能の目的は、こういった苦労の種を抽象化することです。" - -#: ../../ext/tasks/index.rst:17 -msgid "Recipes" -msgstr "レシピ" - -#: ../../ext/tasks/index.rst:19 -msgid "A simple background task in a :class:`~discord.ext.commands.Cog`:" -msgstr ":class:`~discord.ext.commands.Cog` におけるシンプルなバックグラウンドタスク:" - -#: ../../ext/tasks/index.rst:38 -msgid "Adding an exception to handle during reconnect:" -msgstr "再接続中に処理する例外を追加します:" - -#: ../../ext/tasks/index.rst:61 -msgid "Looping a certain amount of times before exiting:" -msgstr "特定の回数ループさせる:" - -#: ../../ext/tasks/index.rst:77 -msgid "Waiting until the bot is ready before the loop starts:" -msgstr "ループが始まる前に、Botの準備が整うまで待機する: " - -#: ../../ext/tasks/index.rst:102 -msgid "Doing something during cancellation:" -msgstr "キャンセルする場合、その間に何らかの処理を行う:" - -#: ../../ext/tasks/index.rst:136 -msgid "API Reference" -msgstr "APIリファレンス" - -#: discord.ext.tasks.Loop:1 of -msgid "" -"A background task helper that abstracts the loop and reconnection logic " -"for you." -msgstr "ループと再接続処理を抽象化するバックグラウンドタスクのヘルパー。" - -#: discord.ext.tasks.Loop:3 of -msgid "The main interface to create this is through :func:`loop`." -msgstr ":func:`loop` はこれを作成するための主要なインタフェースです。" - -#: discord.ext.tasks.Loop.current_loop:1 of -msgid "The current iteration of the loop." -msgstr "" - -#: discord.ext.tasks.Loop.current_loop discord.ext.tasks.Loop.next_iteration of -msgid "type" -msgstr "" - -#: discord.ext.tasks.Loop.current_loop:3 of -#, fuzzy -msgid ":class:`int`" -msgstr ":class:`asyncio.Task`" - -#: discord.ext.tasks.Loop.next_iteration:1 of -msgid "When the next iteration of the loop will occur." -msgstr "" - -#: discord.ext.tasks.Loop.next_iteration:5 of -msgid "Optional[:class:`datetime.datetime`]" -msgstr "" - -#: discord.ext.tasks.Loop.start:1 of -msgid "Starts the internal task in the event loop." -msgstr "" - -#: discord.ext.tasks.Loop.add_exception_type discord.ext.tasks.Loop.after_loop -#: discord.ext.tasks.Loop.before_loop discord.ext.tasks.Loop.change_interval -#: discord.ext.tasks.Loop.error discord.ext.tasks.Loop.remove_exception_type -#: discord.ext.tasks.Loop.restart discord.ext.tasks.Loop.start -#: discord.ext.tasks.loop of -msgid "Parameters" -msgstr "パラメーター" - -#: discord.ext.tasks.Loop.start:3 of -msgid "The arguments to use." -msgstr "" - -#: discord.ext.tasks.Loop.restart:9 discord.ext.tasks.Loop.start:4 of -msgid "The keyword arguments to use." -msgstr "" - -#: discord.ext.tasks.Loop.add_exception_type discord.ext.tasks.Loop.after_loop -#: discord.ext.tasks.Loop.before_loop discord.ext.tasks.Loop.change_interval -#: discord.ext.tasks.Loop.error discord.ext.tasks.Loop.start -#: discord.ext.tasks.loop of -#, fuzzy -msgid "Raises" -msgstr "例外" - -#: discord.ext.tasks.Loop.start:6 of -msgid "A task has already been launched and is running." -msgstr "" - -#: discord.ext.tasks.Loop.remove_exception_type discord.ext.tasks.Loop.start of -msgid "Returns" -msgstr "戻り値" - -#: discord.ext.tasks.Loop.start:8 of -msgid "The task that has been created." -msgstr "タスクが作成されました。" - -#: discord.ext.tasks.Loop.remove_exception_type discord.ext.tasks.Loop.start of -msgid "Return type" -msgstr "戻り値の型" - -#: discord.ext.tasks.Loop.start:9 of -msgid ":class:`asyncio.Task`" -msgstr ":class:`asyncio.Task`" - -#: discord.ext.tasks.Loop.stop:1 of -msgid "Gracefully stops the task from running." -msgstr "" - -#: discord.ext.tasks.Loop.stop:3 of -msgid "" -"Unlike :meth:`cancel`\\, this allows the task to finish its current " -"iteration before gracefully exiting." -msgstr "" - -#: discord.ext.tasks.Loop.stop:8 of -msgid "" -"If the internal function raises an error that can be handled before " -"finishing then it will retry until it succeeds." -msgstr "" - -#: discord.ext.tasks.Loop.stop:12 of -msgid "" -"If this is undesirable, either remove the error handling before stopping " -"via :meth:`clear_exception_types` or use :meth:`cancel` instead." -msgstr "" - -#: discord.ext.tasks.Loop.cancel:1 of -msgid "Cancels the internal task, if it is running." -msgstr "" - -#: discord.ext.tasks.Loop.restart:1 of -msgid "A convenience method to restart the internal task." -msgstr "" - -#: discord.ext.tasks.Loop.restart:5 of -msgid "" -"Due to the way this function works, the task is not returned like " -":meth:`start`." -msgstr "" - -#: discord.ext.tasks.Loop.restart:8 of -msgid "The arguments to to use." -msgstr "" - -#: discord.ext.tasks.Loop.add_exception_type:1 of -#, fuzzy -msgid "Adds exception types to be handled during the reconnect logic." -msgstr "再接続中に処理する例外を追加します:" - -#: discord.ext.tasks.Loop.add_exception_type:3 of -msgid "" -"By default the exception types handled are those handled by " -":meth:`discord.Client.connect`\\, which includes a lot of internet " -"disconnection errors." -msgstr "" - -#: discord.ext.tasks.Loop.add_exception_type:7 of -msgid "" -"This function is useful if you're interacting with a 3rd party library " -"that raises its own set of exceptions." -msgstr "" - -#: discord.ext.tasks.Loop.add_exception_type:10 -#: discord.ext.tasks.Loop.remove_exception_type:3 of -msgid "An argument list of exception classes to handle." -msgstr "" - -#: discord.ext.tasks.Loop.add_exception_type:13 of -msgid "" -"An exception passed is either not a class or not inherited from " -":class:`BaseException`." -msgstr "" - -#: discord.ext.tasks.Loop.clear_exception_types:1 of -msgid "Removes all exception types that are handled." -msgstr "" - -#: discord.ext.tasks.Loop.clear_exception_types:5 of -msgid "This operation obviously cannot be undone!" -msgstr "" - -#: discord.ext.tasks.Loop.remove_exception_type:1 of -#, fuzzy -msgid "Removes exception types from being handled during the reconnect logic." -msgstr "再接続中に処理する例外を追加します:" - -#: discord.ext.tasks.Loop.remove_exception_type:6 of -msgid "Whether all exceptions were successfully removed." -msgstr "" - -#: discord.ext.tasks.Loop.remove_exception_type:7 of -msgid ":class:`bool`" -msgstr "" - -#: discord.ext.tasks.Loop.get_task:1 of -msgid "" -"Optional[:class:`asyncio.Task`]: Fetches the internal task or ``None`` if" -" there isn't one running." -msgstr "" - -#: discord.ext.tasks.Loop.is_being_cancelled:1 of -msgid "Whether the task is being cancelled." -msgstr "" - -#: discord.ext.tasks.Loop.failed:1 of -msgid ":class:`bool`: Whether the internal task has failed." -msgstr "" - -#: discord.ext.tasks.Loop.is_running:1 of -msgid ":class:`bool`: Check if the task is currently running." -msgstr "" - -#: discord.ext.tasks.Loop.before_loop:1 of -msgid "" -"A decorator that registers a coroutine to be called before the loop " -"starts running." -msgstr "" - -#: discord.ext.tasks.Loop.before_loop:3 of -msgid "" -"This is useful if you want to wait for some bot state before the loop " -"starts, such as :meth:`discord.Client.wait_until_ready`." -msgstr "" - -#: discord.ext.tasks.Loop.after_loop:3 discord.ext.tasks.Loop.before_loop:6 of -msgid "The coroutine must take no arguments (except ``self`` in a class context)." -msgstr "" - -#: discord.ext.tasks.Loop.before_loop:8 of -msgid "The coroutine to register before the loop runs." -msgstr "" - -#: discord.ext.tasks.Loop.after_loop:14 discord.ext.tasks.Loop.before_loop:11 -#: discord.ext.tasks.Loop.error:13 discord.ext.tasks.loop:22 of -msgid "The function was not a coroutine." -msgstr "" - -#: discord.ext.tasks.Loop.after_loop:1 of -msgid "" -"A decorator that register a coroutine to be called after the loop " -"finished running." -msgstr "" - -#: discord.ext.tasks.Loop.after_loop:7 of -msgid "" -"This coroutine is called even during cancellation. If it is desirable to " -"tell apart whether something was cancelled or not, check to see whether " -":meth:`is_being_cancelled` is ``True`` or not." -msgstr "" - -#: discord.ext.tasks.Loop.after_loop:11 of -msgid "The coroutine to register after the loop finishes." -msgstr "" - -#: discord.ext.tasks.Loop.error:1 of -msgid "" -"A decorator that registers a coroutine to be called if the task " -"encounters an unhandled exception." -msgstr "" - -#: discord.ext.tasks.Loop.error:3 of -msgid "" -"The coroutine must take only one argument the exception raised (except " -"``self`` in a class context)." -msgstr "" - -#: discord.ext.tasks.Loop.error:5 of -msgid "" -"By default this prints to :data:`sys.stderr` however it could be " -"overridden to have a different implementation." -msgstr "" - -#: discord.ext.tasks.Loop.error:10 of -msgid "The coroutine to register in the event of an unhandled exception." -msgstr "" - -#: discord.ext.tasks.Loop.change_interval:1 of -msgid "Changes the interval for the sleep time." -msgstr "" - -#: discord.ext.tasks.Loop.change_interval:5 of -msgid "" -"This only applies on the next loop iteration. If it is desirable for the " -"change of interval to be applied right away, cancel the task with " -":meth:`cancel`." -msgstr "" - -#: discord.ext.tasks.Loop.change_interval:10 discord.ext.tasks.loop:4 of -msgid "The number of seconds between every iteration." -msgstr "" - -#: discord.ext.tasks.Loop.change_interval:12 discord.ext.tasks.loop:6 of -msgid "The number of minutes between every iteration." -msgstr "" - -#: discord.ext.tasks.Loop.change_interval:14 discord.ext.tasks.loop:8 of -msgid "The number of hours between every iteration." -msgstr "" - -#: discord.ext.tasks.Loop.change_interval:17 discord.ext.tasks.loop:21 of -msgid "An invalid value was given." -msgstr "" - -#: discord.ext.tasks.loop:1 of -msgid "" -"A decorator that schedules a task in the background for you with optional" -" reconnect logic. The decorator returns a :class:`Loop`." -msgstr "" - -#: discord.ext.tasks.loop:10 of -msgid "The number of loops to do, ``None`` if it should be an infinite loop." -msgstr "" - -#: discord.ext.tasks.loop:13 of -msgid "" -"Whether to handle errors and restart the task using an exponential back-" -"off algorithm similar to the one used in :meth:`discord.Client.connect`." -msgstr "" - -#: discord.ext.tasks.loop:17 of -msgid "" -"The loop to use to register the task, if not given defaults to " -":func:`asyncio.get_event_loop`." -msgstr "" - -#~ msgid ":class:`int` -- The current iteration of the loop." -#~ msgstr "" - -#~ msgid ":exc:`RuntimeError` -- A task has already been launched and is running." -#~ msgstr "" - -#~ msgid "Adds an exception type to be handled during the reconnect logic." -#~ msgstr "" - -#~ msgid "The exception class to handle." -#~ msgstr "" - -#~ msgid "" -#~ ":exc:`TypeError` -- The exception passed " -#~ "is either not a class or not " -#~ "inherited from :class:`BaseException`." -#~ msgstr "" - -#~ msgid "" -#~ "Removes an exception type from being " -#~ "handled during the reconnect logic." -#~ msgstr "" - -#~ msgid "Whether it was successfully removed." -#~ msgstr "" - -#~ msgid ":exc:`TypeError` -- The function was not a coroutine." -#~ msgstr "" - -#~ msgid ":exc:`ValueError` -- An invalid value was given." -#~ msgstr "" - -#~ msgid "" -#~ "A decorator that schedules a task " -#~ "in the background for you with " -#~ "optional reconnect logic." -#~ msgstr "" - -#~ msgid "The loop helper that handles the background task." -#~ msgstr "" - -#~ msgid ":class:`Loop`" -#~ msgstr "" - diff --git a/docs/locale/ja/LC_MESSAGES/faq.po b/docs/locale/ja/LC_MESSAGES/faq.po deleted file mode 100644 index 27e21a27..00000000 --- a/docs/locale/ja/LC_MESSAGES/faq.po +++ /dev/null @@ -1,582 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../faq.rst:5 -msgid "Frequently Asked Questions" -msgstr "よくある質問" - -#: ../../faq.rst:7 -msgid "" -"This is a list of Frequently Asked Questions regarding using " -"``discord.py`` and its extension modules. Feel free to suggest a new " -"question or submit one via pull requests." -msgstr "これは ``discord.py`` 及び 拡張モジュールに対して、よくある質問をまとめたものです。気軽に質問やプルリクエストを提出してください。" - -#: ../../faq.rst:11 -msgid "Questions" -msgstr "質問" - -#: ../../faq.rst:14 -msgid "Coroutines" -msgstr "コルーチン" - -#: ../../faq.rst:16 -msgid "Questions regarding coroutines and asyncio belong here." -msgstr "コルーチンとasyncioに関する質問。" - -#: ../../faq.rst:19 -msgid "What is a coroutine?" -msgstr "コルーチンとはなんですか。" - -#: ../../faq.rst:21 -msgid "" -"A |coroutine_link|_ is a function that must be invoked with ``await`` or " -"``yield from``. When Python encounters an ``await`` it stops the " -"function's execution at that point and works on other things until it " -"comes back to that point and finishes off its work. This allows for your " -"program to be doing multiple things at the same time without using " -"threads or complicated multiprocessing." -msgstr "" -"|coroutine_link|_ とは ``await`` または ``yield from`` から呼び出さなければならない関数です。 " -"``await`` にエンカウントした場合、そのポイントで関数の実行を停止し、他の作業を実行します。 " -"これは作業が終了し、このポイントに戻ってくるまで続きます。 " -"これにより、スレッドや複雑なマルチプロセッシングを用いずに複数の処理を並列実行することができます。" - -#: ../../faq.rst:26 -msgid "" -"**If you forget to await a coroutine then the coroutine will not run. " -"Never forget to await a coroutine.**" -msgstr "**コルーチンにawaitを記述し忘れた場合、コルーチンは実行されません。awaitの記述を忘れないように注意してください。**" - -#: ../../faq.rst:29 -msgid "Where can I use ``await``\\?" -msgstr "``await`` はどこで使用することができますか。" - -#: ../../faq.rst:31 -msgid "" -"You can only use ``await`` inside ``async def`` functions and nowhere " -"else." -msgstr "``await`` は ``async def`` 関数の中でのみ使用できます。" - -#: ../../faq.rst:34 -msgid "What does \"blocking\" mean?" -msgstr "「ブロッキング」とはなんですか。" - -#: ../../faq.rst:36 -msgid "" -"In asynchronous programming a blocking call is essentially all the parts " -"of the function that are not ``await``. Do not despair however, because " -"not all forms of blocking are bad! Using blocking calls is inevitable, " -"but you must work to make sure that you don't excessively block " -"functions. Remember, if you block for too long then your bot will freeze " -"since it has not stopped the function's execution at that point to do " -"other things." -msgstr "" -"非同期プログラミングにおけるブロッキングとは、関数内の ``await`` 修飾子がないコードすべてを指します。 " -"しかし、全てのブロッキングが悪いというわけではありません。ブロッキングを使用することは避けられませんが、ブロックの発生は出来るだけ少なくする必要があります。長時間のブロックが発生すると、関数の実行が停止しないため、長時間Botがフリーズすることになることを覚えておきましょう。" - -#: ../../faq.rst:41 -msgid "" -"If logging is enabled, this library will attempt to warn you that " -"blocking is occurring with the message: ``Heartbeat blocked for more than" -" N seconds.`` See :ref:`logging_setup` for details on enabling logging." -msgstr "" -"もしロギングを有効にしている場合、ライブラリはブロッキングが起きていることを次のメッセージで警告しようと試みます: ``Heartbeat " -"blocked for more than N seconds.`` " -"ロギングを有効にするには、:ref:`logging_setup`をご覧ください。" - -#: ../../faq.rst:45 -msgid "" -"A common source of blocking for too long is something like " -":func:`time.sleep`. Don't do that. Use :func:`asyncio.sleep` instead. " -"Similar to this example: ::" -msgstr "" -"長時間ブロックの原因として一般的なのは :func:`time.sleep` などです。 これは使用せず、下記の例のように " -":func:`asyncio.sleep` を使用してください。" - -#: ../../faq.rst:54 -msgid "" -"Another common source of blocking for too long is using HTTP requests " -"with the famous module :doc:`req:index`. While :doc:`req:index` is an " -"amazing module for non-asynchronous programming, it is not a good choice " -"for :mod:`asyncio` because certain requests can block the event loop too " -"long. Instead, use the :doc:`aiohttp ` library which is " -"installed on the side with this library." -msgstr "" -"また、これだけでなく、有名なモジュール :doc:`req:index` のHTTPリクエストも長時間ブロックの原因になります。 " -":doc:`req:index` " -"モジュールは非非同期プログラミングでは素晴らしいモジュールですが、特定のリクエストがイベントループを長時間ブロックする可能性があるため、 " -":mod:`asyncio` には適していません。 代わりにこのライブラリと一緒にインストールされた :doc:`aiohttp " -"` を使用してください。" - -#: ../../faq.rst:59 -msgid "Consider the following example: ::" -msgstr "次の例を見てみましょう。" - -#: ../../faq.rst:75 -msgid "General" -msgstr "一般" - -#: ../../faq.rst:77 -msgid "General questions regarding library usage belong here." -msgstr "ライブラリの使用に関する一般的な質問。" - -#: ../../faq.rst:80 -msgid "Where can I find usage examples?" -msgstr "" - -#: ../../faq.rst:82 -msgid "" -"Example code can be found in the `examples folder " -"`_ in the " -"repository." -msgstr "" - -#: ../../faq.rst:86 -msgid "How do I set the \"Playing\" status?" -msgstr "「プレイ中」状態の設定をするにはどうすればいいですか。" - -#: ../../faq.rst:88 -msgid "" -"There is a method for this under :class:`Client` called " -":meth:`Client.change_presence`. The relevant aspect of this is its " -"``activity`` keyword argument which takes in an :class:`Activity` object." -msgstr "" -":class:`Client` 下にプレイ中状態の設定を行うためのメソッド :meth:`Client.change_presence` " -"が用意されています。 これの引数 ``activity`` に :class:`Activity` を渡します。" - -#: ../../faq.rst:91 -msgid "" -"The status type (playing, listening, streaming, watching) can be set " -"using the :class:`ActivityType` enum. For memory optimisation purposes, " -"some activities are offered in slimmed down versions:" -msgstr "" -"ステータスタイプ(プレイ中、再生中、配信中、視聴中)は列挙型の :class:`ActivityType` " -"を指定することで設定が可能です。メモリの最適化のため、一部のアクティビティはスリム化したバージョンで提供しています。" - -#: ../../faq.rst:94 -msgid ":class:`Game`" -msgstr ":class:`Game`" - -#: ../../faq.rst:95 -msgid ":class:`Streaming`" -msgstr ":class:`Streaming`" - -#: ../../faq.rst:97 -msgid "Putting both of these pieces of info together, you get the following: ::" -msgstr "これらの情報をまとめると以下のようになります: ::" - -#: ../../faq.rst:106 -msgid "How do I send a message to a specific channel?" -msgstr "特定のチャンネルにメッセージを送るにはどうすればいいですか。" - -#: ../../faq.rst:108 -msgid "" -"You must fetch the channel directly and then call the appropriate method." -" Example: ::" -msgstr "チャンネルを直接取得してから、適切なメソッドの呼び出しを行う必要があります。以下がその例です。" - -#: ../../faq.rst:114 -msgid "How do I send a DM?" -msgstr "" - -#: ../../faq.rst:116 -msgid "" -"Get the :class:`User` or :class:`Member` object and call " -":meth:`abc.Messageable.send`. For example: ::" -msgstr "" - -#: ../../faq.rst:121 -msgid "" -"If you are responding to an event, such as :func:`on_message`, you " -"already have the :class:`User` object via :attr:`Message.author`: ::" -msgstr "" - -#: ../../faq.rst:126 -#, fuzzy -msgid "How do I get the ID of a sent message?" -msgstr "元の ``message`` を取得するにはどうすればよいですか。" - -#: ../../faq.rst:128 -msgid "" -":meth:`abc.Messageable.send` returns the :class:`Message` that was sent. " -"The ID of a message can be accessed via :attr:`Message.id`: ::" -msgstr "" - -#: ../../faq.rst:135 -msgid "How do I upload an image?" -msgstr "画像をアップロードするにはどうすればいいですか。" - -#: ../../faq.rst:137 -msgid "To upload something to Discord you have to use the :class:`File` object." -msgstr "Discordに何かをアップロードする際には :class:`File` オブジェクトを使用する必要があります。" - -#: ../../faq.rst:139 -msgid "" -"A :class:`File` accepts two parameters, the file-like object (or file " -"path) and the filename to pass to Discord when uploading." -msgstr ":class:`File` は二つのパラメータがあり、ファイルライクなオブジェクト(または、そのファイルパス)と、ファイル名を渡すことができます。" - -#: ../../faq.rst:142 -msgid "If you want to upload an image it's as simple as: ::" -msgstr "画像をアップロードするだけなら、以下のように簡単に行なえます。" - -#: ../../faq.rst:146 -msgid "If you have a file-like object you can do as follows: ::" -msgstr "もし、ファイルライクなオブジェクトがあるなら、以下のような実装が可能です。" - -#: ../../faq.rst:151 -msgid "" -"To upload multiple files, you can use the ``files`` keyword argument " -"instead of ``file``\\: ::" -msgstr "複数のファイルをアップロードするには、 ``file`` の代わりに ``files`` を使用しましょう。" - -#: ../../faq.rst:159 -msgid "" -"If you want to upload something from a URL, you will have to use an HTTP " -"request using :doc:`aiohttp ` and then pass an " -":class:`io.BytesIO` instance to :class:`File` like so:" -msgstr "" -"URLから何かをアップロードする場合は、 :doc:`aiohttp ` のHTTPリクエストを使用し、 " -":class:`io.BytesIO` インスタンスを :class:`File` にわたす必要があります。" - -#: ../../faq.rst:176 -msgid "How can I add a reaction to a message?" -msgstr "メッセージにリアクションをつけるにはどうすればいいですか。" - -#: ../../faq.rst:178 -msgid "You use the :meth:`Message.add_reaction` method." -msgstr ":meth:`Client.add_reaction` を使用してください。" - -#: ../../faq.rst:180 -msgid "" -"If you want to use unicode emoji, you must pass a valid unicode code " -"point in a string. In your code, you can write this in a few different " -"ways:" -msgstr "Unicodeの絵文字を使用する場合は、文字列内の有効なUnicodeのコードポイントを渡す必要があります。 例を挙げると、このようになります。" - -#: ../../faq.rst:182 -msgid "``'👍'``" -msgstr "``'👍'``" - -#: ../../faq.rst:183 -msgid "``'\\U0001F44D'``" -msgstr "``'\\U0001F44D'``" - -#: ../../faq.rst:184 -msgid "``'\\N{THUMBS UP SIGN}'``" -msgstr "``'\\N{THUMBS UP SIGN}'``" - -#: ../../faq.rst:186 ../../faq.rst:202 ../../faq.rst:277 ../../faq.rst:293 -#: ../../faq.rst:313 -msgid "Quick example: ::" -msgstr "簡単な例。" - -#: ../../faq.rst:192 -msgid "" -"In case you want to use emoji that come from a message, you already get " -"their code points in the content without needing to do anything special. " -"You **cannot** send ``':thumbsup:'`` style shorthands." -msgstr "" -"メッセージから来た絵文字を使用したい場合は、特になにをするでもなく、コンテンツのコードポイントをあなたは取得しています。また、 " -"``':thumbsup:'`` のような簡略化したものを送信することは **できません** 。" - -#: ../../faq.rst:195 -msgid "" -"For custom emoji, you should pass an instance of :class:`Emoji`. You can " -"also pass a ``'<:name:id>'`` string, but if you can use said emoji, you " -"should be able to use :meth:`Client.get_emoji` to get an emoji via ID or " -"use :func:`utils.find`/ :func:`utils.get` on :attr:`Client.emojis` or " -":attr:`Guild.emojis` collections." -msgstr "" -"カスタム絵文字については、:class:`Emoji`のインスタンスを渡すといいでしょう。``'<:名前:ID>'``形式の文字列も渡せますが、その絵文字が使えるなら、:meth:`Client.get_emoji`でIDから絵文字を取得したり、:attr:`Client.emojis`" -" や :attr:`Guild.emojis`に対して:func:`utils.find`/ " -":func:`utils.get`を使ったりできるでしょう。" - -#: ../../faq.rst:199 -msgid "" -"The name and ID of a custom emoji can be found with the client by " -"prefixing ``:custom_emoji:`` with a backslash. For example, sending the " -"message ``\\:python3:`` with the client will result in " -"``<:python3:232720527448342530>``." -msgstr "カスタム絵文字の名前とIDをクライアント側で知るには、``:カスタム絵文字:``の頭にバックスラッシュ(円記号)をつけます。たとえば、メッセージ``\\:python3:``を送信すると、結果は``<:python3:232720527448342530>``になります。" - -#: ../../faq.rst:219 -msgid "How do I pass a coroutine to the player's \"after\" function?" -msgstr "どうやってコルーチンをプレイヤーの後処理に渡すのですか。" - -#: ../../faq.rst:221 -msgid "" -"The library's music player launches on a separate thread, ergo it does " -"not execute inside a coroutine. This does not mean that it is not " -"possible to call a coroutine in the ``after`` parameter. To do so you " -"must pass a callable that wraps up a couple of aspects." -msgstr "" -"ライブラリの音楽プレーヤーは別のスレッドで起動するもので、コルーチン内で実行されるものではありません。しかし、 ``after`` " -"にコルーチンが渡せないというわけではありません。コルーチンを渡すためには、いくつかの機能を包括した呼び出し可能コードで渡す必要があります。" - -#: ../../faq.rst:225 -msgid "" -"The first gotcha that you must be aware of is that calling a coroutine is" -" not a thread-safe operation. Since we are technically in another thread," -" we must take caution in calling thread-safe operations so things do not " -"bug out. Luckily for us, :mod:`asyncio` comes with a " -":func:`asyncio.run_coroutine_threadsafe` function that allows us to call " -"a coroutine from another thread." -msgstr "" -"コルーチンを呼び出すという動作はスレッドセーフなものではないということを最初に理解しておく必要があります。技術的に別スレッドなので、スレッドセーフに呼び出す際には注意が必要です。幸運にも、" -" :mod:`asyncio` には :func:`asyncio.run_coroutine_threadsafe` " -"という関数があります。これを用いることで、別スレッドからコルーチンを呼び出すことが可能です。" - -#: ../../faq.rst:230 -msgid "" -"However, this function returns a :class:`concurrent.Future` and to " -"actually call it we have to fetch its result. Putting all of this " -"together we can do the following: ::" -msgstr "" -"しかし、この関数は :class:`concurrent.Future` " -"を返すので、実際にはそこから結果を読み出す必要があります。これをすべてまとめると、次のことができます。" - -#: ../../faq.rst:245 -msgid "How do I run something in the background?" -msgstr "バックグラウンドで何かを動かすにはどうすればいいですか。" - -#: ../../faq.rst:247 -msgid "" -"`Check the background_task.py example. " -"`_" -msgstr "" -"`background_task.pyの例を参照してください。 " -"`_" - -#: ../../faq.rst:250 -msgid "How do I get a specific model?" -msgstr "特定のユーザー、役割、チャンネル、サーバを取得するにはどうすればいいですか。" - -#: ../../faq.rst:252 -msgid "" -"There are multiple ways of doing this. If you have a specific model's ID " -"then you can use one of the following functions:" -msgstr "方法は複数ありますが、特定のモデルのIDがわかっていれば、以下の方法が使えます。" - -#: ../../faq.rst:255 -msgid ":meth:`Client.get_channel`" -msgstr ":meth:`Client.get_channel`" - -#: ../../faq.rst:256 -msgid ":meth:`Client.get_guild`" -msgstr ":meth:`Client.get_guild`" - -#: ../../faq.rst:257 -msgid ":meth:`Client.get_user`" -msgstr ":meth:`Client.get_user`" - -#: ../../faq.rst:258 -msgid ":meth:`Client.get_emoji`" -msgstr ":meth:`Client.get_emoji`" - -#: ../../faq.rst:259 -msgid ":meth:`Guild.get_member`" -msgstr ":meth:`Guild.get_member`" - -#: ../../faq.rst:260 -msgid ":meth:`Guild.get_channel`" -msgstr ":meth:`Guild.get_channel`" - -#: ../../faq.rst:261 -msgid ":meth:`Guild.get_role`" -msgstr ":meth:`Guild.get_role`" - -#: ../../faq.rst:263 -msgid "The following use an HTTP request:" -msgstr "以下の例ではHTTPリクエストを使用します。" - -#: ../../faq.rst:265 -msgid ":meth:`abc.Messageable.fetch_message`" -msgstr ":meth:`abc.Messageable.fetch_message`" - -#: ../../faq.rst:266 -msgid ":meth:`Client.fetch_user`" -msgstr ":meth:`Client.fetch_user`" - -#: ../../faq.rst:267 -msgid ":meth:`Client.fetch_guilds`" -msgstr ":meth:`Client.fetch_guilds`" - -#: ../../faq.rst:268 -msgid ":meth:`Client.fetch_guild`" -msgstr ":meth:`Client.fetch_guild`" - -#: ../../faq.rst:269 -msgid ":meth:`Guild.fetch_emoji`" -msgstr ":meth:`Guild.fetch_emoji`" - -#: ../../faq.rst:270 -msgid ":meth:`Guild.fetch_emojis`" -msgstr ":meth:`Guild.fetch_emojis`" - -#: ../../faq.rst:271 -msgid ":meth:`Guild.fetch_member`" -msgstr ":meth:`Guild.fetch_member`" - -#: ../../faq.rst:274 -msgid "" -"If the functions above do not help you, then use of :func:`utils.find` or" -" :func:`utils.get` would serve some use in finding specific models." -msgstr "上記の関数を使えない状況の場合、 :func:`utils.find` または :func:`utils.get` が役に立つでしょう。" - -#: ../../faq.rst:288 -msgid "How do I make a web request?" -msgstr "Webリクエストはどうやって作ればよいですか。" - -#: ../../faq.rst:290 -msgid "" -"To make a request, you should use a non-blocking library. This library " -"already uses and requires a 3rd party library for making requests, " -"``aiohttp``." -msgstr "" -"リクエストを送るには、ノンブロッキングのライブラリを使わなければなりません。このライブラリは、リクエストを作成するのにサードパーティー製の " -"``aiohttp`` を必要とします。" - -#: ../../faq.rst:300 -msgid "" -"See `aiohttp's full documentation " -"`_ for more information." -msgstr "" -"詳細は `aiohttpの完全なドキュメント `_ " -"を参照してください。" - -#: ../../faq.rst:303 -msgid "How do I use a local image file for an embed image?" -msgstr "Embedの画像にローカルの画像を使用するにはどうすればいいですか。" - -#: ../../faq.rst:305 -msgid "" -"Discord special-cases uploading an image attachment and using it within " -"an embed so that it will not display separately, but instead in the " -"embed's thumbnail, image, footer or author icon." -msgstr "特殊なケースとして、画像が別々に表示されないようDiscordにembedを用いてアップロードする際、画像は代わりにembedのサムネイルや画像、フッター、製作者アイコンに表示されます。" - -#: ../../faq.rst:308 -msgid "" -"To do so, upload the image normally with :meth:`abc.Messageable.send`, " -"and set the embed's image URL to ``attachment://image.png``, where " -"``image.png`` is the filename of the image you will send." -msgstr "" -"これを行うには、通常通り :meth:`abc.Messageable.send` を用いて画像をアップロードし、Embedの画像URLに " -"``attachment://image.png`` を設定します。このとき ``image.png`` は送信したい画像のファイル名にです。" - -#: ../../faq.rst:322 -msgid "Due to a Discord limitation, filenames may not include underscores." -msgstr "Discord側の制限により、ファイル名にアンダースコアが含まれていない場合があります。" - -#: ../../faq.rst:325 -#, fuzzy -msgid "Is there an event for audit log entries being created?" -msgstr "招待、または監査ログのエントリが作成されるイベントはありますか。" - -#: ../../faq.rst:327 -msgid "" -"Since Discord does not dispatch this information in the gateway, the " -"library cannot provide this information. This is currently a Discord " -"limitation." -msgstr "Discordはゲートウェイでこの情報をディスパッチしないため、ライブラリによってこの情報を提供することはできません。これは現在、Discord側の制限です。" - -#: ../../faq.rst:331 -msgid "Commands Extension" -msgstr "コマンド拡張" - -#: ../../faq.rst:333 -msgid "Questions regarding ``discord.ext.commands`` belong here." -msgstr "``discord.ext.commands`` に関する質問。" - -#: ../../faq.rst:336 -msgid "Why does ``on_message`` make my commands stop working?" -msgstr "``on_message`` を使うとコマンドが動作しなくなります。どうしてですか。" - -#: ../../faq.rst:338 -msgid "" -"Overriding the default provided ``on_message`` forbids any extra commands" -" from running. To fix this, add a ``bot.process_commands(message)`` line " -"at the end of your ``on_message``. For example: ::" -msgstr "" -"デフォルトで提供されている ``on_message`` をオーバーライドすると、コマンドが実行されなくなります。これを修正するには " -"``on_message`` の最後に ``bot.process_commands(message)`` を追加してみてください。" - -#: ../../faq.rst:347 -msgid "" -"Alternatively, you can place your ``on_message`` logic into a " -"**listener**. In this setup, you should not manually call " -"``bot.process_commands()``. This also allows you to do multiple things " -"asynchronously in response to a message. Example::" -msgstr "" - -#: ../../faq.rst:357 -msgid "Why do my arguments require quotes?" -msgstr "コマンドの引数にクォーテーションが必要なのはなぜですか。" - -#: ../../faq.rst:359 -msgid "In a simple command defined as: ::" -msgstr "次の簡単なコマンドを見てみましょう。" - -#: ../../faq.rst:365 -msgid "" -"Calling it via ``?echo a b c`` will only fetch the first argument and " -"disregard the rest. To fix this you should either call it via ``?echo \"a" -" b c\"`` or change the signature to have \"consume rest\" behaviour. " -"Example: ::" -msgstr "" -"このコマンドを ``?echo a b c`` " -"のように実行したとき、コマンドに渡されるのは最初の引数だけです。その後の引数はすべて無視されます。これを正常に動かすためには ``?echo " -"\"a b c\"`` のようにしてコマンドを実行するか、コマンドの引数を下記の例のようにしてみましょう" - -#: ../../faq.rst:372 -msgid "This will allow you to use ``?echo a b c`` without needing the quotes." -msgstr "これにより、クォーテーションなしで ``?echo a b c`` を使用することができます。" - -#: ../../faq.rst:375 -msgid "How do I get the original ``message``\\?" -msgstr "元の ``message`` を取得するにはどうすればよいですか。" - -#: ../../faq.rst:377 -msgid "" -"The :class:`~ext.commands.Context` contains an attribute, " -":attr:`~.Context.message` to get the original message." -msgstr "" -":class:`~ext.commands.Context` は元のメッセージを取得するための属性である " -":attr:`~.Context.message` を持っています。" - -#: ../../faq.rst:380 ../../faq.rst:392 -msgid "Example: ::" -msgstr "例:" - -#: ../../faq.rst:387 -msgid "How do I make a subcommand?" -msgstr "サブコマンドを作るにはどうすればいいですか。" - -#: ../../faq.rst:389 -msgid "" -"Use the ``group`` decorator. This will transform the callback into a " -"``Group`` which will allow you to add commands into the group operating " -"as \"subcommands\". These groups can be arbitrarily nested as well." -msgstr "" -"``group`` デコレータを使います。これにより、コールバックが ``Group`` " -"に変換され、groupに「サブコマンド」として動作するコマンドを追加できます。これらのグループは、ネストすることもできます。" - -#: ../../faq.rst:403 -msgid "This could then be used as ``?git push origin master``." -msgstr "これは ``?git push origin master`` のように使うことができます。" - diff --git a/docs/locale/ja/LC_MESSAGES/index.po b/docs/locale/ja/LC_MESSAGES/index.po deleted file mode 100644 index 45e368fb..00000000 --- a/docs/locale/ja/LC_MESSAGES/index.po +++ /dev/null @@ -1,83 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../index.rst:7 -msgid "Welcome to discord.py" -msgstr "discord.py へようこそ。" - -#: ../../index.rst:11 -msgid "" -"discord.py is a modern, easy to use, feature-rich, and async ready API " -"wrapper for Discord." -msgstr "discord.py は機能豊富かつモダンで使いやすい、非同期処理にも対応したDiscord用のAPIラッパーです。" - -#: ../../index.rst:14 -msgid "**Features:**" -msgstr "**特徴:**" - -#: ../../index.rst:16 -msgid "Modern Pythonic API using ``async``\\/``await`` syntax" -msgstr "``async``\\/``await`` 構文を使ったモダンなPythonらしいAPI" - -#: ../../index.rst:17 -msgid "Sane rate limit handling that prevents 429s" -msgstr "429エラー防止の為のレート制限" - -#: ../../index.rst:18 -msgid "Implements the entire Discord API" -msgstr "Discord APIを完全にカバー" - -#: ../../index.rst:19 -msgid "Command extension to aid with bot creation" -msgstr "Bot作成に便利なコマンド拡張" - -#: ../../index.rst:20 -msgid "Easy to use with an object oriented design" -msgstr "オブジェクト指向設計で使いやすい" - -#: ../../index.rst:21 -msgid "Optimised for both speed and memory" -msgstr "メモリと速度の両方を最適化" - -#: ../../index.rst:24 -msgid "Documentation Contents" -msgstr "ドキュメントの目次" - -#: ../../index.rst:36 -msgid "Extensions" -msgstr "拡張機能" - -#: ../../index.rst:46 -msgid "Additional Information" -msgstr "追加情報" - -#: ../../index.rst:57 -msgid "" -"If you still can't find what you're looking for, try in one of the " -"following pages:" -msgstr "探しているものが見つからない場合は、以下のページを試してください。" - -#: ../../index.rst:59 -msgid ":ref:`genindex`" -msgstr ":ref:`genindex`" - -#: ../../index.rst:60 -msgid ":ref:`search`" -msgstr ":ref:`search`" - -#~ msgid ":ref:`modindex`" -#~ msgstr ":ref:`modindex`" - diff --git a/docs/locale/ja/LC_MESSAGES/intents.po b/docs/locale/ja/LC_MESSAGES/intents.po deleted file mode 100644 index a3d6d75e..00000000 --- a/docs/locale/ja/LC_MESSAGES/intents.po +++ /dev/null @@ -1,429 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2015-present, Rapptz -# This file is distributed under the same license as the discord.py package. -# FIRST AUTHOR , 2020. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: discord.py 1.5.1\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../intents.rst:6 -msgid "A Primer to Gateway Intents" -msgstr "" - -#: ../../intents.rst:8 -msgid "" -"In version 1.5 comes the introduction of :class:`Intents`. This is a " -"radical change in how bots are written. An intent basically allows a bot " -"to subscribe into specific buckets of events. The events that correspond " -"to each intent is documented in the individual attribute of the " -":class:`Intents` documentation." -msgstr "" - -#: ../../intents.rst:10 -msgid "" -"These intents are passed to the constructor of :class:`Client` or its " -"subclasses (:class:`AutoShardedClient`, :class:`~.AutoShardedBot`, " -":class:`~.Bot`) with the ``intents`` argument." -msgstr "" - -#: ../../intents.rst:12 -msgid "" -"If intents are not passed, then the library defaults to every intent " -"being enabled except the privileged intents, currently " -":attr:`Intents.members` and :attr:`Intents.presences`." -msgstr "" - -#: ../../intents.rst:15 -msgid "What intents are needed?" -msgstr "" - -#: ../../intents.rst:17 -msgid "" -"The intents that are necessary for your bot can only be dictated by " -"yourself. Each attribute in the :class:`Intents` class documents what " -":ref:`events ` it corresponds to and what kind of " -"cache it enables." -msgstr "" - -#: ../../intents.rst:19 -msgid "" -"For example, if you want a bot that functions without spammy events like " -"presences or typing then we could do the following:" -msgstr "" - -#: ../../intents.rst:34 -msgid "" -"Note that this doesn't enable :attr:`Intents.members` since it's a " -"privileged intent." -msgstr "" - -#: ../../intents.rst:36 -msgid "" -"Another example showing a bot that only deals with messages and guild " -"information:" -msgstr "" - -#: ../../intents.rst:54 -msgid "Privileged Intents" -msgstr "" - -#: ../../intents.rst:56 -msgid "" -"With the API change requiring bot authors to specify intents, some " -"intents were restricted further and require more manual steps. These " -"intents are called **privileged intents**." -msgstr "" - -#: ../../intents.rst:58 -msgid "" -"A privileged intent is one that requires you to go to the developer " -"portal and manually enable it. To enable privileged intents do the " -"following:" -msgstr "" - -#: ../../intents.rst:60 -msgid "" -"Make sure you're logged on to the `Discord website " -"`_." -msgstr "" - -#: ../../intents.rst:61 -msgid "" -"Navigate to the `application page " -"`_" -msgstr "" - -#: ../../intents.rst:62 -msgid "Click on the bot you want to enable privileged intents for." -msgstr "" - -#: ../../intents.rst:63 -msgid "Navigate to the bot tab on the left side of the screen." -msgstr "" - -#: ../../intents.rst:68 -msgid "" -"Scroll down to the \"Privileged Gateway Intents\" section and enable the " -"ones you want." -msgstr "" - -#: ../../intents.rst:75 -msgid "" -"Enabling privileged intents when your bot is in over 100 guilds requires " -"going through `bot verification `_. If your bot is already verified and you " -"would like to enable a privileged intent you must go through `discord " -"support `_ and talk to them about it." -msgstr "" - -#: ../../intents.rst:79 -msgid "" -"Even if you enable intents through the developer portal, you still have " -"to enable the intents through code as well." -msgstr "" - -#: ../../intents.rst:83 -msgid "Do I need privileged intents?" -msgstr "" - -#: ../../intents.rst:85 -msgid "This is a quick checklist to see if you need specific privileged intents." -msgstr "" - -#: ../../intents.rst:90 -msgid "Presence Intent" -msgstr "" - -#: ../../intents.rst:92 -msgid "Whether you use :attr:`Member.status` at all to track member statuses." -msgstr "" - -#: ../../intents.rst:93 -msgid "" -"Whether you use :attr:`Member.activity` or :attr:`Member.activities` to " -"check member's activities." -msgstr "" - -#: ../../intents.rst:98 -msgid "Member Intent" -msgstr "" - -#: ../../intents.rst:100 -msgid "" -"Whether you track member joins or member leaves, corresponds to " -":func:`on_member_join` and :func:`on_member_remove` events." -msgstr "" - -#: ../../intents.rst:101 -msgid "Whether you want to track member updates such as nickname or role changes." -msgstr "" - -#: ../../intents.rst:102 -msgid "" -"Whether you want to track user updates such as usernames, avatars, " -"discriminators, etc." -msgstr "" - -#: ../../intents.rst:103 -msgid "" -"Whether you want to request the guild member list through " -":meth:`Guild.chunk` or :meth:`Guild.fetch_members`." -msgstr "" - -#: ../../intents.rst:104 -msgid "Whether you want high accuracy member cache under :attr:`Guild.members`." -msgstr "" - -#: ../../intents.rst:109 -msgid "Member Cache" -msgstr "" - -#: ../../intents.rst:111 -msgid "" -"Along with intents, Discord now further restricts the ability to cache " -"members and expects bot authors to cache as little as is necessary. " -"However, to properly maintain a cache the :attr:`Intents.members` intent " -"is required in order to track the members who left and properly evict " -"them." -msgstr "" - -#: ../../intents.rst:113 -msgid "" -"To aid with member cache where we don't need members to be cached, the " -"library now has a :class:`MemberCacheFlags` flag to control the member " -"cache. The documentation page for the class goes over the specific " -"policies that are possible." -msgstr "" - -#: ../../intents.rst:115 -msgid "" -"It should be noted that certain things do not need a member cache since " -"Discord will provide full member information if possible. For example:" -msgstr "" - -#: ../../intents.rst:117 -msgid "" -":func:`on_message` will have :attr:`Message.author` be a member even if " -"cache is disabled." -msgstr "" - -#: ../../intents.rst:118 -msgid "" -":func:`on_voice_state_update` will have the ``member`` parameter be a " -"member even if cache is disabled." -msgstr "" - -#: ../../intents.rst:119 -msgid "" -":func:`on_reaction_add` will have the ``user`` parameter be a member even" -" if cache is disabled." -msgstr "" - -#: ../../intents.rst:120 -msgid "" -":func:`on_raw_reaction_add` will have " -":attr:`RawReactionActionEvent.member` be a member even if cache is " -"disabled." -msgstr "" - -#: ../../intents.rst:121 -msgid "" -"The reaction removal events do not have the member information. This is a" -" Discord limitation." -msgstr "" - -#: ../../intents.rst:123 -msgid "" -"Other events that take a :class:`Member` will require the use of the " -"member cache. If absolute accuracy over the member cache is desirable, " -"then it is advisable to have the :attr:`Intents.members` intent enabled." -msgstr "" - -#: ../../intents.rst:128 -msgid "Retrieving Members" -msgstr "" - -#: ../../intents.rst:130 -msgid "" -"If cache is disabled or you disable chunking guilds at startup, we might " -"still need a way to load members. The library offers a few ways to do " -"this:" -msgstr "" - -#: ../../intents.rst:134 -msgid ":meth:`Guild.query_members`" -msgstr "" - -#: ../../intents.rst:133 -msgid "Used to query members by a prefix matching nickname or username." -msgstr "" - -#: ../../intents.rst:134 -msgid "This can also be used to query members by their user ID." -msgstr "" - -#: ../../intents.rst:135 -msgid "This uses the gateway and not the HTTP." -msgstr "" - -#: ../../intents.rst:136 -msgid ":meth:`Guild.chunk`" -msgstr "" - -#: ../../intents.rst:137 -msgid "This can be used to fetch the entire member list through the gateway." -msgstr "" - -#: ../../intents.rst:138 -msgid ":meth:`Guild.fetch_member`" -msgstr "" - -#: ../../intents.rst:139 -msgid "Used to fetch a member by ID through the HTTP API." -msgstr "" - -#: ../../intents.rst:141 -msgid ":meth:`Guild.fetch_members`" -msgstr "" - -#: ../../intents.rst:141 -msgid "used to fetch a large number of members through the HTTP API." -msgstr "" - -#: ../../intents.rst:143 -msgid "" -"It should be noted that the gateway has a strict rate limit of 120 " -"requests per 60 seconds." -msgstr "" - -#: ../../intents.rst:146 -msgid "Troubleshooting" -msgstr "" - -#: ../../intents.rst:148 -msgid "Some common issues relating to the mandatory intent change." -msgstr "" - -#: ../../intents.rst:151 -msgid "Where'd my members go?" -msgstr "" - -#: ../../intents.rst:153 -msgid "" -"Due to an :ref:`API change ` 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 ` and change the " -":attr:`Intents.members` attribute to true." -msgstr "" - -#: ../../intents.rst:155 -msgid "For example:" -msgstr "" - -#: ../../intents.rst:170 -msgid "Why does ``on_ready`` take so long to fire?" -msgstr "" - -#: ../../intents.rst:172 -msgid "" -"As part of the API change regarding intents, Discord also changed how " -"members are loaded in the beginning. Originally the library could request" -" 75 guilds at once and only request members from guilds that have the " -":attr:`Guild.large` attribute set to ``True``. With the new intent " -"changes, Discord mandates that we can only send 1 guild per request. This" -" causes a 75x slowdown which is further compounded by the fact that *all*" -" guilds, not just large guilds are being requested." -msgstr "" - -#: ../../intents.rst:174 -msgid "There are a few solutions to fix this." -msgstr "" - -#: ../../intents.rst:176 -msgid "" -"The first solution is to request the privileged presences intent along " -"with the privileged members intent and enable both of them. This allows " -"the initial member list to contain online members just like the old " -"gateway. Note that we're still limited to 1 guild per request but the " -"number of guilds we request is significantly reduced." -msgstr "" - -#: ../../intents.rst:178 -msgid "" -"The second solution is to disable member chunking by setting " -"``chunk_guilds_at_startup`` to ``False`` when constructing a client. " -"Then, when chunking for a guild is necessary you can use the various " -"techniques to :ref:`retrieve members `." -msgstr "" - -#: ../../intents.rst:180 -msgid "" -"To illustrate the slowdown caused the API change, take a bot who is in " -"840 guilds and 95 of these guilds are \"large\" (over 250 members)." -msgstr "" - -#: ../../intents.rst:182 -msgid "" -"Under the original system this would result in 2 requests to fetch the " -"member list (75 guilds, 20 guilds) roughly taking 60 seconds. With " -":attr:`Intents.members` but not :attr:`Intents.presences` this requires " -"840 requests, with a rate limit of 120 requests per 60 seconds means that" -" due to waiting for the rate limit it totals to around 7 minutes of " -"waiting for the rate limit to fetch all the members. With both " -":attr:`Intents.members` and :attr:`Intents.presences` we mostly get the " -"old behaviour so we're only required to request for the 95 guilds that " -"are large, this is slightly less than our rate limit so it's close to the" -" original timing to fetch the member list." -msgstr "" - -#: ../../intents.rst:184 -msgid "" -"Unfortunately due to this change being required from Discord there is " -"nothing that the library can do to mitigate this." -msgstr "" - -#: ../../intents.rst:187 -msgid "I don't like this, can I go back?" -msgstr "" - -#: ../../intents.rst:189 -msgid "" -"For now, the old gateway will still work so downgrading to discord.py " -"v1.4 is still possible and will continue to be supported until Discord " -"officially kills the v6 gateway, which is imminent. However it is " -"paramount that for the future of your bot that you upgrade your code to " -"the new way things are done." -msgstr "" - -#: ../../intents.rst:191 -msgid "To downgrade you can do the following:" -msgstr "" - -#: ../../intents.rst:197 -msgid "On Windows use ``py -3`` instead of ``python3``." -msgstr "" - -#: ../../intents.rst:201 -msgid "" -"There is no currently set date in which the old gateway will stop working" -" so it is recommended to update your code instead." -msgstr "" - -#: ../../intents.rst:203 -msgid "" -"If you truly dislike the direction Discord is going with their API, you " -"can contact them via `support `_" -msgstr "" diff --git a/docs/locale/ja/LC_MESSAGES/intro.po b/docs/locale/ja/LC_MESSAGES/intro.po deleted file mode 100644 index d41af2bd..00000000 --- a/docs/locale/ja/LC_MESSAGES/intro.po +++ /dev/null @@ -1,123 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: intro.pot\n" -"X-Crowdin-File-ID: 80\n" -"Language: ja_JP\n" - -#: ../../intro.rst:6 -msgid "Introduction" -msgstr "はじめに" - -#: ../../intro.rst:8 -msgid "This is the documentation for discord.py, a library for Python to aid in creating applications that utilise the Discord API." -msgstr "これはDiscord APIを利用したアプリケーションを作成するのに便利なPythonライブラリ、discord.pyのドキュメントです。" - -#: ../../intro.rst:12 -msgid "Prerequisites" -msgstr "前提" - -#: ../../intro.rst:14 -msgid "discord.py works with Python 3.5.3 or higher. Support for earlier versions of Python is not provided. Python 2.7 or lower is not supported. Python 3.4 or lower is not supported due to one of the dependencies (:doc:`aiohttp `) not supporting Python 3.4." -msgstr "discord.pyは3.5.3以降のバージョンのPythonで動作します。Python2.7のような旧バージョンはサポートされていません。Python3.4以下は依存関係にあるライブラリ (:doc:`aiohttp `) がサポートされていないため、サポートしていません。" - -#: ../../intro.rst:22 -msgid "Installing" -msgstr "インストール" - -#: ../../intro.rst:24 -msgid "You can get the library directly from PyPI: ::" -msgstr "PyPIから直接ライブラリをインストールできます。" - -#: ../../intro.rst:28 -msgid "If you are using Windows, then the following should be used instead: ::" -msgstr "Windowsを使用している場合は、以下のコマンドで実行してください。" - -#: ../../intro.rst:33 -msgid "To get voice support, you should use ``discord.py[voice]`` instead of ``discord.py``, e.g. ::" -msgstr "音声のサポートが必要な場合は、 ``discord.py`` ではなく、以下の例のように ``discord.py[voice]`` を使うべきです。" - -#: ../../intro.rst:37 -msgid "On Linux environments, installing voice requires getting the following dependencies:" -msgstr "Linux環境では、依存関係にある以下のライブラリが必要になるので注意してください。" - -#: ../../intro.rst:39 -msgid "`libffi `_" -msgstr "`libffi `_" - -#: ../../intro.rst:40 -msgid "`libnacl `_" -msgstr "`libnacl `_" - -#: ../../intro.rst:41 -msgid "`python3-dev `_" -msgstr "`python3-dev `_" - -#: ../../intro.rst:43 -msgid "For a Debian-based system, the following command will get these dependencies:" -msgstr "Debianベースのシステムでは、次のコマンドで依存関係にあるライブラリを取得できます。" - -#: ../../intro.rst:49 -msgid "Remember to check your permissions!" -msgstr "自分の権限の確認は忘れないようにしてください!" - -#: ../../intro.rst:52 -msgid "Virtual Environments" -msgstr "仮想環境" - -#: ../../intro.rst:54 -msgid "Sometimes you want to keep libraries from polluting system installs or use a different version of libraries than the ones installed on the system. You might also not have permissions to install libaries system-wide. For this purpose, the standard library as of Python 3.3 comes with a concept called \"Virtual Environment\"s to help maintain these separate versions." -msgstr "システムへのインストールをライブラリによって汚したくない場合や、現在インストールされているシステムとは異なるバージョンのライブラリを使用したい場合があります。または、システムへのライブラリのインストール権限がない場合などです。こういった目的のため、Python3.3の標準ライブラリには、このように別々のバージョンを保持したい場合のために、「仮想環境」というものが用意されています。" - -#: ../../intro.rst:59 -msgid "A more in-depth tutorial is found on :doc:`py:tutorial/venv`." -msgstr "より詳しいチュートリアルは :doc:`py:tutorial/venv` にあります。" - -#: ../../intro.rst:61 -msgid "However, for the quick and dirty:" -msgstr "簡単に仮想環境を構築する方法。" - -#: ../../intro.rst:63 -msgid "Go to your project's working directory:" -msgstr "プロジェクトの作業ディレクトリに移動してください。" - -#: ../../intro.rst:70 -msgid "Activate the virtual environment:" -msgstr "下記コマンドで仮想環境を有効化します。" - -#: ../../intro.rst:76 -msgid "On Windows you activate it with:" -msgstr "Windowsの場合は、こちらを使ってください。" - -#: ../../intro.rst:82 -msgid "Use pip like usual:" -msgstr "いつものようにpipインストールを実行します。" - -#: ../../intro.rst:88 -msgid "Congratulations. You now have a virtual environment all set up." -msgstr "おめでとうございます。これで仮想環境のセットアップができました。" - -#: ../../intro.rst:91 -msgid "Basic Concepts" -msgstr "基本概念" - -#: ../../intro.rst:93 -msgid "discord.py revolves around the concept of :ref:`events `. An event is something you listen to and then respond to. For example, when a message happens, you will receive an event about it that you can respond to." -msgstr "discord.pyは :ref:`イベント ` の概念を中心としています。イベントは何かを受け取り、それに対する応答を行います。例えば、メッセージが発生すると、メッセージの発生に関連するイベントを受け取り、そのイベントに対して応答を返すことができます。" - -#: ../../intro.rst:97 -msgid "A quick example to showcase how events work:" -msgstr "以下はイベントの仕組みを紹介する簡単な例です。" - diff --git a/docs/locale/ja/LC_MESSAGES/logging.po b/docs/locale/ja/LC_MESSAGES/logging.po deleted file mode 100644 index 85cc2f89..00000000 --- a/docs/locale/ja/LC_MESSAGES/logging.po +++ /dev/null @@ -1,77 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../logging.rst:5 -msgid "Setting Up Logging" -msgstr "ログの設定" - -#: ../../logging.rst:7 -msgid "" -"*discord.py* logs errors and debug information via the :mod:`logging` " -"python module. It is strongly recommended that the logging module is " -"configured, as no errors or warnings will be output if it is not set up. " -"Configuration of the ``logging`` module can be as simple as::" -msgstr "" -"*discord.py* はPythonの :mod:`logging` " -"モジュールを介してエラーやデバッグの情報を記録します。loggingモジュールが設定されていない場合は、エラーや警告が出力されないため、設定するとを強くおすすめします。loggingモジュールの設定は下記手順で簡単に実装が可能です。" - -#: ../../logging.rst:16 -#, fuzzy -msgid "" -"Placed at the start of the application. This will output the logs from " -"discord as well as other libraries that use the ``logging`` module " -"directly to the console." -msgstr "" -"アプリケーションの始めにこれを書き加えるだけです。これはdiscordからのログを ``logging`` " -"モジュールを用いた他のライブラリ同様、コンソールに出力します。" - -#: ../../logging.rst:20 -#, fuzzy -msgid "" -"The optional ``level`` argument specifies what level of events to log out" -" and can be any of ``CRITICAL``, ``ERROR``, ``WARNING``, ``INFO``, and " -"``DEBUG`` and if not specified defaults to ``WARNING``." -msgstr "" -"オプションである ``level`` の引数は出力するイベントのレベルを指定するためのもので、 ``CRITICAL``, ``ERROR``, " -"``WARNING``, ``INFO`` そして ``DEBUG`` を指定することが可能です。指定されていない場合はデフォルトである " -"``WARNING`` に設定されます。" - -#: ../../logging.rst:24 -#, fuzzy -msgid "" -"More advanced setups are possible with the :mod:`logging` module. For " -"example to write the logs to a file called ``discord.log`` instead of " -"outputting them to the console the following snippet can be used::" -msgstr "" -"また、 :mod:`logging` モジュールでは更に高度な設定が可能です。たとえば、コンソールへ出力するのではなく、 " -"``discord.log`` というファイルにログを出力するには、以下のスニペットが利用できます。" - -#: ../../logging.rst:37 -#, fuzzy -msgid "" -"This is recommended, especially at verbose levels such as ``INFO`` and " -"``DEBUG``, as there are a lot of events logged and it would clog the " -"stdout of your program." -msgstr "" -"特に、 ``INFO`` や ``DEBUG`` " -"といった冗長なイベントレベルを設定している場合、プログラムの標準出力をつまらせてしまう原因になるため、ファイルへの出力が推奨されます。" - -#: ../../logging.rst:43 -msgid "" -"For more information, check the documentation and tutorial of the " -":mod:`logging` module." -msgstr "詳細は、:mod:`logging` モジュールのドキュメントを参照してください。" - diff --git a/docs/locale/ja/LC_MESSAGES/migrating.po b/docs/locale/ja/LC_MESSAGES/migrating.po deleted file mode 100644 index 0327ce5e..00000000 --- a/docs/locale/ja/LC_MESSAGES/migrating.po +++ /dev/null @@ -1,2548 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../migrating.rst:6 -msgid "Migrating to v1.0" -msgstr "v1.0への移行" - -#: ../../migrating.rst:8 -msgid "" -"v1.0 is one of the biggest breaking changes in the library due to a " -"complete redesign." -msgstr "v1.0 では完全な書き直しが行われたため,このライブラリにおけるもっとも大きな更新のひとつといえます。" - -#: ../../migrating.rst:11 -msgid "" -"The amount of changes are so massive and long that for all intents and " -"purposes, it is a completely new library." -msgstr "すべての意図と目的を達成するために変更点が長大になった結果,ライブラリは完全に新しいものになりました。" - -#: ../../migrating.rst:14 -msgid "" -"Part of the redesign involves making things more easy to use and natural." -" Things are done on the :ref:`models ` instead of " -"requiring a :class:`Client` instance to do any work." -msgstr "" -"一部の書き換えは,より使いやすく自然に物事を表現するために行われています。あらゆる仕事をするのに :class:`Client` " -"インスタンスを要求するのではなく,代わりに :ref:`models ` " -"を用いることができるようになりました。" - -#: ../../migrating.rst:18 -msgid "Python Version Change" -msgstr "Pythonのバージョンの変更" - -#: ../../migrating.rst:20 -msgid "" -"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**." -msgstr "" -"discord.py の開発をより簡単にし,またその依存関係にあるライブラリをアップグレードして Python 3.7 " -"以上を使えるようにするために,discord.py は Python 3.5.3 " -"より古いバージョンに対するサポートを諦めざるを得ませんでした。これはつまり **Python 3.4 に対するサポートは打ち切られた** " -"ということです。" - -#: ../../migrating.rst:25 -msgid "Major Model Changes" -msgstr "主要モデルの変更" - -#: ../../migrating.rst:27 -msgid "Below are major model changes that have happened in v1.0" -msgstr "以下は v1.0 で発生した主要なモデルの変更点です。" - -#: ../../migrating.rst:30 -msgid "Snowflakes are int" -msgstr "Snowflakeのint型への変更" - -#: ../../migrating.rst:32 -msgid "" -"Before v1.0, all snowflakes (the ``id`` attribute) were strings. This has" -" been changed to :class:`int`." -msgstr "" -"v1.0以前は、全てのsnowflake (``id`` 属性) が文字列として扱われていましたが、これは :class:`int` " -"型に変更されました。" - -#: ../../migrating.rst:34 ../../migrating.rst:254 -msgid "Quick example: ::" -msgstr "簡単な例:" - -#: ../../migrating.rst:46 -msgid "" -"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." -msgstr "" -"この変更により,公式クライアントの「 ID をコピー」機能を使用した際に間違いがより起こりにくくなりました。もはや取得した ID " -"をクォーテーションマークで囲う必要はありませんし,内部で JSON の代わりに ETF を用いることで最適化の機会を得ることにもなります。" - -#: ../../migrating.rst:50 -msgid "Server is now Guild" -msgstr "Server から Guild に変更" - -#: ../../migrating.rst:52 -msgid "" -"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." -msgstr "" -"公式のAPIドキュメントでは、「Server」は「Guild」と呼ばれています。APIドキュメントとの一貫性を保つため、モデルの名称が " -":class:`Guild` へ変更されました。同時にこのモデルを参照するすべてのインスタンスも変更されています。" - -#: ../../migrating.rst:56 -msgid "A list of changes is as follows:" -msgstr "変更点の一覧" - -#: ../../migrating.rst:59 ../../migrating.rst:95 ../../migrating.rst:869 -msgid "Before" -msgstr "変更前" - -#: ../../migrating.rst:59 ../../migrating.rst:95 ../../migrating.rst:869 -msgid "After" -msgstr "変更後" - -#: ../../migrating.rst:61 -msgid "``Message.server``" -msgstr "``Message.server``" - -#: ../../migrating.rst:61 -msgid ":attr:`Message.guild`" -msgstr ":attr:`Message.guild`" - -#: ../../migrating.rst:63 -msgid "``Channel.server``" -msgstr "``Channel.server``" - -#: ../../migrating.rst:63 -msgid ":attr:`.GuildChannel.guild`" -msgstr ":attr:`.GuildChannel.guild`" - -#: ../../migrating.rst:65 -msgid "``Client.servers``" -msgstr "``Client.servers``" - -#: ../../migrating.rst:65 ../../migrating.rst:233 -msgid ":attr:`Client.guilds`" -msgstr ":attr:`Client.guilds`" - -#: ../../migrating.rst:67 -msgid "``Client.get_server``" -msgstr "``Client.get_server``" - -#: ../../migrating.rst:67 -msgid ":meth:`Client.get_guild`" -msgstr ":meth:`Client.get_guild`" - -#: ../../migrating.rst:69 -msgid "``Emoji.server``" -msgstr "``Emoji.server``" - -#: ../../migrating.rst:69 -msgid ":attr:`Emoji.guild`" -msgstr ":attr:`Emoji.guild`" - -#: ../../migrating.rst:71 -msgid "``Role.server``" -msgstr "``Role.server``" - -#: ../../migrating.rst:71 -msgid ":attr:`Role.guild`" -msgstr ":attr:`Role.guild`" - -#: ../../migrating.rst:73 -msgid "``Invite.server``" -msgstr "``Invite.server``" - -#: ../../migrating.rst:73 -msgid ":attr:`Invite.guild`" -msgstr ":attr:`Invite.guild`" - -#: ../../migrating.rst:75 -msgid "``Member.server``" -msgstr "``Member.server``" - -#: ../../migrating.rst:75 -msgid ":attr:`Member.guild`" -msgstr ":attr:`Member.guild`" - -#: ../../migrating.rst:77 -msgid "``Permissions.manage_server``" -msgstr "``Permissions.manage_server``" - -#: ../../migrating.rst:77 -msgid ":attr:`Permissions.manage_guild`" -msgstr ":attr:`Permissions.manage_guild`" - -#: ../../migrating.rst:79 -msgid "``VoiceClient.server``" -msgstr "``VoiceClient.server``" - -#: ../../migrating.rst:79 -msgid ":attr:`VoiceClient.guild`" -msgstr ":attr:`VoiceClient.guild`" - -#: ../../migrating.rst:81 -msgid "``Client.create_server``" -msgstr "``Client.create_server``" - -#: ../../migrating.rst:81 -msgid ":meth:`Client.create_guild`" -msgstr ":meth:`Client.create_guild`" - -#: ../../migrating.rst:87 -msgid "Models are Stateful" -msgstr "モデルのステートフル化" - -#: ../../migrating.rst:89 -msgid "" -"As mentioned earlier, a lot of functionality was moved out of " -":class:`Client` and put into their respective :ref:`model " -"`." -msgstr "" -"前述したように、多くの機能が :class:`Client` から各々の :ref:`model ` " -"へと移されました。" - -#: ../../migrating.rst:92 -msgid "A list of these changes is enumerated below." -msgstr "以下が、これによる変更点の一覧です。" - -#: ../../migrating.rst:97 -msgid "``Client.add_reaction``" -msgstr "``Client.add_reaction``" - -#: ../../migrating.rst:97 -msgid ":meth:`Message.add_reaction`" -msgstr ":meth:`Message.add_reaction`" - -#: ../../migrating.rst:99 -msgid "``Client.add_roles``" -msgstr "``Client.add_roles``" - -#: ../../migrating.rst:99 -msgid ":meth:`Member.add_roles`" -msgstr ":meth:`Member.add_roles`" - -#: ../../migrating.rst:101 -msgid "``Client.ban``" -msgstr "``Client.ban``" - -#: ../../migrating.rst:101 -msgid ":meth:`Member.ban` or :meth:`Guild.ban`" -msgstr ":meth:`Member.ban` または :meth:`Guild.ban`" - -#: ../../migrating.rst:103 -msgid "``Client.change_nickname``" -msgstr "``Client.change_nickname``" - -#: ../../migrating.rst:103 ../../migrating.rst:171 ../../migrating.rst:187 -#: ../../migrating.rst:195 -msgid ":meth:`Member.edit`" -msgstr ":meth:`Member.edit`" - -#: ../../migrating.rst:105 -msgid "``Client.clear_reactions``" -msgstr "``Client.clear_reactions``" - -#: ../../migrating.rst:105 -msgid ":meth:`Message.clear_reactions`" -msgstr ":meth:`Message.clear_reactions`" - -#: ../../migrating.rst:107 -msgid "``Client.create_channel``" -msgstr "``Client.create_channel``" - -#: ../../migrating.rst:107 -msgid ":meth:`Guild.create_text_channel` and :meth:`Guild.create_voice_channel`" -msgstr ":meth:`Guild.create_text_channel` および :meth:`Guild.create_voice_channel`" - -#: ../../migrating.rst:109 -msgid "``Client.create_custom_emoji``" -msgstr "``Client.create_custom_emoji``" - -#: ../../migrating.rst:109 -msgid ":meth:`Guild.create_custom_emoji`" -msgstr ":meth:`Guild.create_custom_emoji`" - -#: ../../migrating.rst:111 -msgid "``Client.create_invite``" -msgstr "``Client.create_invite``" - -#: ../../migrating.rst:111 -msgid ":meth:`abc.GuildChannel.create_invite`" -msgstr ":meth:`abc.GuildChannel.create_invite`" - -#: ../../migrating.rst:113 -msgid "``Client.create_role``" -msgstr "``Client.create_role``" - -#: ../../migrating.rst:113 -msgid ":meth:`Guild.create_role`" -msgstr ":meth:`Guild.create_role`" - -#: ../../migrating.rst:115 -msgid "``Client.delete_channel``" -msgstr "``Client.delete_channel``" - -#: ../../migrating.rst:115 -msgid ":meth:`abc.GuildChannel.delete`" -msgstr ":meth:`abc.GuildChannel.delete`" - -#: ../../migrating.rst:117 -msgid "``Client.delete_channel_permissions``" -msgstr "``Client.delete_channel_permissions``" - -#: ../../migrating.rst:117 -msgid "" -":meth:`abc.GuildChannel.set_permissions` with ``overwrite`` set to " -"``None``" -msgstr "" -":meth:`abc.GuildChannel.set_permissions` の ``overwrite`` を ``None`` " -"に設定しました" - -#: ../../migrating.rst:119 -msgid "``Client.delete_custom_emoji``" -msgstr "``Client.delete_custom_emoji``" - -#: ../../migrating.rst:119 -msgid ":meth:`Emoji.delete`" -msgstr ":meth:`Emoji.delete`" - -#: ../../migrating.rst:121 -msgid "``Client.delete_invite``" -msgstr "``Client.delete_invite``" - -#: ../../migrating.rst:121 -msgid ":meth:`Invite.delete` or :meth:`Client.delete_invite`" -msgstr ":meth:`Invite.delete` または :meth:`Client.delete_invite`" - -#: ../../migrating.rst:123 -msgid "``Client.delete_message``" -msgstr "``Client.delete_message``" - -#: ../../migrating.rst:123 -msgid ":meth:`Message.delete`" -msgstr ":meth:`Message.delete`" - -#: ../../migrating.rst:125 -msgid "``Client.delete_messages``" -msgstr "``Client.delete_messages``" - -#: ../../migrating.rst:125 -msgid ":meth:`TextChannel.delete_messages`" -msgstr ":meth:`TextChannel.delete_messages`" - -#: ../../migrating.rst:127 -msgid "``Client.delete_role``" -msgstr "``Client.delete_role``" - -#: ../../migrating.rst:127 -msgid ":meth:`Role.delete`" -msgstr ":meth:`Role.delete`" - -#: ../../migrating.rst:129 -msgid "``Client.delete_server``" -msgstr "``Client.delete_server``" - -#: ../../migrating.rst:129 -msgid ":meth:`Guild.delete`" -msgstr ":meth:`Guild.delete`" - -#: ../../migrating.rst:131 -msgid "``Client.edit_channel``" -msgstr "``Client.edit_channel``" - -#: ../../migrating.rst:131 ../../migrating.rst:169 -msgid ":meth:`TextChannel.edit` or :meth:`VoiceChannel.edit`" -msgstr ":meth:`TextChannel.edit` または :meth:`VoiceChannel.edit`" - -#: ../../migrating.rst:133 -msgid "``Client.edit_channel_permissions``" -msgstr "``Client.edit_channel_permissions``" - -#: ../../migrating.rst:133 -msgid ":meth:`abc.GuildChannel.set_permissions`" -msgstr ":meth:`abc.GuildChannel.set_permissions`" - -#: ../../migrating.rst:135 -msgid "``Client.edit_custom_emoji``" -msgstr "``Client.edit_custom_emoji``" - -#: ../../migrating.rst:135 -msgid ":meth:`Emoji.edit`" -msgstr ":meth:`Emoji.edit`" - -#: ../../migrating.rst:137 -msgid "``Client.edit_message``" -msgstr "``Client.edit_message``" - -#: ../../migrating.rst:137 -msgid ":meth:`Message.edit`" -msgstr ":meth:`Message.edit`" - -#: ../../migrating.rst:139 -msgid "``Client.edit_profile``" -msgstr "``Client.edit_profile``" - -#: ../../migrating.rst:139 -msgid ":meth:`ClientUser.edit` (you get this from :attr:`Client.user`)" -msgstr ":meth:`ClientUser.edit` ( :attr:`Client.user` から取得可能)" - -#: ../../migrating.rst:141 -msgid "``Client.edit_role``" -msgstr "``Client.edit_role``" - -#: ../../migrating.rst:141 ../../migrating.rst:173 -msgid ":meth:`Role.edit`" -msgstr ":meth:`Role.edit`" - -#: ../../migrating.rst:143 -msgid "``Client.edit_server``" -msgstr "``Client.edit_server``" - -#: ../../migrating.rst:143 -msgid ":meth:`Guild.edit`" -msgstr ":meth:`Guild.edit`" - -#: ../../migrating.rst:145 -msgid "``Client.estimate_pruned_members``" -msgstr "``Client.estimate_pruned_members``" - -#: ../../migrating.rst:145 -msgid ":meth:`Guild.estimate_pruned_members`" -msgstr ":meth:`Guild.estimate_pruned_members`" - -#: ../../migrating.rst:147 ../../migrating.rst:327 -msgid "``Client.get_all_emojis``" -msgstr "``Client.get_all_emojis``" - -#: ../../migrating.rst:147 -msgid ":attr:`Client.emojis`" -msgstr ":attr:`Client.emojis`" - -#: ../../migrating.rst:149 -msgid "``Client.get_bans``" -msgstr "``Client.get_bans``" - -#: ../../migrating.rst:149 -msgid ":meth:`Guild.bans`" -msgstr ":meth:`Guild.bans`" - -#: ../../migrating.rst:151 -msgid "``Client.get_invite``" -msgstr "``Client.get_invite``" - -#: ../../migrating.rst:151 -msgid ":meth:`Client.fetch_invite`" -msgstr ":meth:`Client.fetch_invite`" - -#: ../../migrating.rst:153 -msgid "``Client.get_message``" -msgstr "``Client.get_message``" - -#: ../../migrating.rst:153 -msgid ":meth:`abc.Messageable.fetch_message`" -msgstr ":meth:`abc.Messageable.fetch_message`" - -#: ../../migrating.rst:155 -msgid "``Client.get_reaction_users``" -msgstr "``Client.get_reaction_users``" - -#: ../../migrating.rst:155 ../../migrating.rst:493 -msgid ":meth:`Reaction.users`" -msgstr ":meth:`Reaction.users`" - -#: ../../migrating.rst:157 -msgid "``Client.get_user_info``" -msgstr "``Client.get_user_info``" - -#: ../../migrating.rst:157 -msgid ":meth:`Client.fetch_user`" -msgstr ":meth:`Client.fetch_user`" - -#: ../../migrating.rst:159 -msgid "``Client.invites_from``" -msgstr "``Client.invites_from``" - -#: ../../migrating.rst:159 -msgid ":meth:`abc.GuildChannel.invites` or :meth:`Guild.invites`" -msgstr ":meth:`abc.GuildChannel.invites` または :meth:`Guild.invites`" - -#: ../../migrating.rst:161 -msgid "``Client.join_voice_channel``" -msgstr "``Client.join_voice_channel``" - -#: ../../migrating.rst:161 -msgid ":meth:`VoiceChannel.connect` (see :ref:`migrating_1_0_voice`)" -msgstr ":meth:`VoiceChannel.connect` ( :ref:`migrating_1_0_voice` を参照)" - -#: ../../migrating.rst:163 -msgid "``Client.kick``" -msgstr "``Client.kick``" - -#: ../../migrating.rst:163 -msgid ":meth:`Guild.kick` or :meth:`Member.kick`" -msgstr ":meth:`Guild.kick` または :meth:`Member.kick`" - -#: ../../migrating.rst:165 -msgid "``Client.leave_server``" -msgstr "``Client.leave_server``" - -#: ../../migrating.rst:165 -msgid ":meth:`Guild.leave`" -msgstr ":meth:`Guild.leave`" - -#: ../../migrating.rst:167 -msgid "``Client.logs_from``" -msgstr "``Client.logs_from``" - -#: ../../migrating.rst:167 -msgid ":meth:`abc.Messageable.history` (see :ref:`migrating_1_0_async_iter`)" -msgstr ":meth:`abc.Messageable.history` ( :ref:`migrating_1_0_async_iter` を参照)" - -#: ../../migrating.rst:169 -msgid "``Client.move_channel``" -msgstr "``Client.move_channel``" - -#: ../../migrating.rst:171 -msgid "``Client.move_member``" -msgstr "``Client.move_member``" - -#: ../../migrating.rst:173 -msgid "``Client.move_role``" -msgstr "``Client.move_role``" - -#: ../../migrating.rst:175 -msgid "``Client.pin_message``" -msgstr "``Client.pin_message``" - -#: ../../migrating.rst:175 -msgid ":meth:`Message.pin`" -msgstr ":meth:`Message.pin`" - -#: ../../migrating.rst:177 -msgid "``Client.pins_from``" -msgstr "``Client.pins_from``" - -#: ../../migrating.rst:177 -msgid ":meth:`abc.Messageable.pins`" -msgstr ":meth:`abc.Messageable.pins`" - -#: ../../migrating.rst:179 -msgid "``Client.prune_members``" -msgstr "``Client.prune_members``" - -#: ../../migrating.rst:179 -msgid ":meth:`Guild.prune_members`" -msgstr ":meth:`Guild.prune_members`" - -#: ../../migrating.rst:181 -msgid "``Client.purge_from``" -msgstr "``Client.purge_from``" - -#: ../../migrating.rst:181 -msgid ":meth:`TextChannel.purge`" -msgstr ":meth:`TextChannel.purge`" - -#: ../../migrating.rst:183 -msgid "``Client.remove_reaction``" -msgstr "``Client.remove_reaction``" - -#: ../../migrating.rst:183 -msgid ":meth:`Message.remove_reaction`" -msgstr ":meth:`Message.remove_reaction`" - -#: ../../migrating.rst:185 -msgid "``Client.remove_roles``" -msgstr "``Client.remove_roles``" - -#: ../../migrating.rst:185 -msgid ":meth:`Member.remove_roles`" -msgstr ":meth:`Member.remove_roles`" - -#: ../../migrating.rst:187 -msgid "``Client.replace_roles``" -msgstr "``Client.replace_roles``" - -#: ../../migrating.rst:189 -msgid "``Client.send_file``" -msgstr "``Client.send_file``" - -#: ../../migrating.rst:189 ../../migrating.rst:191 -msgid ":meth:`abc.Messageable.send` (see :ref:`migrating_1_0_sending_messages`)" -msgstr ":meth:`abc.Messageable.send` ( :ref:`migrating_1_0_sending_messages` を参照)" - -#: ../../migrating.rst:191 -msgid "``Client.send_message``" -msgstr "``Client.send_message``" - -#: ../../migrating.rst:193 -msgid "``Client.send_typing``" -msgstr "``Client.send_typing``" - -#: ../../migrating.rst:193 -msgid "" -":meth:`abc.Messageable.trigger_typing` (use " -":meth:`abc.Messageable.typing`)" -msgstr "" -":meth:`abc.Messageable.trigger_typing` (:meth:`abc.Messageable.typing` " -"を使用してください)" - -#: ../../migrating.rst:195 -msgid "``Client.server_voice_state``" -msgstr "``Client.server_voice_state``" - -#: ../../migrating.rst:197 -msgid "``Client.start_private_message``" -msgstr "``Client.start_private_message``" - -#: ../../migrating.rst:197 -msgid ":meth:`User.create_dm`" -msgstr ":meth:`User.create_dm`" - -#: ../../migrating.rst:199 -msgid "``Client.unban``" -msgstr "``Client.unban``" - -#: ../../migrating.rst:199 -msgid ":meth:`Guild.unban` or :meth:`Member.unban`" -msgstr ":meth:`Guild.unban` または :meth:`Member.unban`" - -#: ../../migrating.rst:201 -msgid "``Client.unpin_message``" -msgstr "``Client.unpin_message``" - -#: ../../migrating.rst:201 -msgid ":meth:`Message.unpin`" -msgstr ":meth:`Message.unpin`" - -#: ../../migrating.rst:203 -msgid "``Client.wait_for_message``" -msgstr "``Client.wait_for_message``" - -#: ../../migrating.rst:203 ../../migrating.rst:205 -msgid ":meth:`Client.wait_for` (see :ref:`migrating_1_0_wait_for`)" -msgstr ":meth:`Client.wait_for` ( :ref:`migrating_1_0_wait_for` を参照)" - -#: ../../migrating.rst:205 -msgid "``Client.wait_for_reaction``" -msgstr "``Client.wait_for_reaction``" - -#: ../../migrating.rst:207 -msgid "``Client.wait_until_login``" -msgstr "``Client.wait_until_login``" - -#: ../../migrating.rst:207 -msgid "Removed" -msgstr "削除されました" - -#: ../../migrating.rst:209 -msgid "``Client.wait_until_ready``" -msgstr "``Client.wait_until_ready``" - -#: ../../migrating.rst:209 -msgid "No change" -msgstr "変更なし" - -#: ../../migrating.rst:213 -msgid "Property Changes" -msgstr "プロパティの変更" - -#: ../../migrating.rst:215 -msgid "" -"In order to be a bit more consistent, certain things that were properties" -" were changed to methods instead." -msgstr "一貫性を持たせるために、いくつかのプロパティがメソッドに変更されました。" - -#: ../../migrating.rst:217 -msgid "" -"The following are now methods instead of properties (requires " -"parentheses):" -msgstr "プロパティの代わりに追加されたメソッドは以下のとおりです。(使用の際にはカッコが必要です)" - -#: ../../migrating.rst:219 -msgid ":meth:`Role.is_default`" -msgstr ":meth:`Role.is_default`" - -#: ../../migrating.rst:220 -msgid ":meth:`Client.is_ready`" -msgstr ":meth:`Client.is_ready`" - -#: ../../migrating.rst:221 -msgid ":meth:`Client.is_closed`" -msgstr ":meth:`Client.is_closed`" - -#: ../../migrating.rst:224 -msgid "Dict Value Change" -msgstr "辞書の値の変更" - -#: ../../migrating.rst:226 -msgid "" -"Prior to v1.0 some aggregating properties that retrieved models would " -"return \"dict view\" objects." -msgstr "v1.0以前では、複数のモデルを集約して取得するプロパティは「辞書ビュー」オブジェクトで結果を返していました。" - -#: ../../migrating.rst:228 -msgid "" -"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." -msgstr "これは、オブジェクトを用いて繰り返し処理を行っている間に、辞書サイズが変更されたとき、RuntimeErrorを発生させてタスクをクラッシュさせていました。これを軽減させるため「辞書ビュー」オブジェクトはリストに変更されました。" - -#: ../../migrating.rst:231 -msgid "The following views were changed to a list:" -msgstr "以下のビューがリストへ変更されています。" - -#: ../../migrating.rst:234 -msgid ":attr:`Client.users` (new in v1.0)" -msgstr ":attr:`Client.users` (v1.0にて追加)" - -#: ../../migrating.rst:235 -msgid ":attr:`Client.emojis` (new in v1.0)" -msgstr ":attr:`Client.emojis` (v1.0にて追加)" - -#: ../../migrating.rst:236 -msgid ":attr:`Guild.channels`" -msgstr ":attr:`Guild.channels`" - -#: ../../migrating.rst:237 -msgid ":attr:`Guild.text_channels` (new in v1.0)" -msgstr ":attr:`Guild.text_channels` (v1.0にて追加)" - -#: ../../migrating.rst:238 -msgid ":attr:`Guild.voice_channels` (new in v1.0)" -msgstr ":attr:`Guild.voice_channels` (v1.0にて追加)" - -#: ../../migrating.rst:239 -msgid ":attr:`Guild.emojis`" -msgstr ":attr:`Guild.emojis`" - -#: ../../migrating.rst:240 -msgid ":attr:`Guild.members`" -msgstr ":attr:`Guild.members`" - -#: ../../migrating.rst:243 -msgid "Voice State Changes" -msgstr "ボイスステートの変更" - -#: ../../migrating.rst:245 -msgid "" -"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." -msgstr "" -"v0.11.0では、ボイスステートを参照するために :class:`VoiceState` が追加され、このクラスを参照するために " -":attr:`Member.voice` が使われていました。" - -#: ../../migrating.rst:248 -msgid "" -"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." -msgstr "これはユーザーにとって透過的なものでしたが、ライブラリがメモリを節約できるようボイスステートの変化が可視的になりました。" - -#: ../../migrating.rst:251 -msgid "" -"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``." -msgstr "" -"ボイスの属性にアクセスするには :attr:`Member.voice` を用いる方法しか存在しません。メンバーがボイスステートを持たない場合は " -"``None`` が返ることに注意してください。" - -#: ../../migrating.rst:267 -msgid "User and Member Type Split" -msgstr "ユーザーとメンバーの分離" - -#: ../../migrating.rst:269 -msgid "" -"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." -msgstr "" -"v1.0では、メモリの節約のため、 :class:`Member` は :class:`User` のサブクラスではなくなりました。代わりに、 " -":class:`User` " -"に記述されたものと同等のプロパティを実装することで、この二つのクラスはフラット化されています。そのため、使用方法に機能的変更はありません。ただし、" -" :func:`isinstance` が使えなくなってしまったことは留意しておくべきです。" - -#: ../../migrating.rst:273 -msgid "" -"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`." -msgstr "" -"メモリの節約は、グローバルな :class:`User` のキャッシュを持つことで実現しました。これによって " -":meth:`Client.get_user` を使ってIDから簡単に :class:`User` " -"を取得できます。また、あなたのクライアントが見ることができるユーザーを :attr:`Client.users` " -"ですべて取得できるようにもなりました。" - -#: ../../migrating.rst:280 -msgid "Channel Type Split" -msgstr "チャンネルタイプの分割" - -#: ../../migrating.rst:282 -msgid "" -"Prior to v1.0, channels were two different types, ``Channel`` and " -"``PrivateChannel`` with a ``is_private`` property to help differentiate " -"between them." -msgstr "" -"v1.0以前のバージョンでは、チャンネルは ``is_private`` で判別する ``Channel`` と " -"``PrivateChannel`` の二通りしかありませんでした。" - -#: ../../migrating.rst:285 -msgid "" -"In order to save memory the channels have been split into 4 different " -"types:" -msgstr "メモリ使用量を削減するため、チャンネルを4つのタイプへ分割しました。" - -#: ../../migrating.rst:287 -msgid ":class:`TextChannel` for guild text channels." -msgstr "ギルドのテキストチャンネル用である :class:`TextChannel` 。" - -#: ../../migrating.rst:288 -msgid ":class:`VoiceChannel` for guild voice channels." -msgstr "ギルドのボイスチャンネル用である :class:`VoiceChannel` 。" - -#: ../../migrating.rst:289 -msgid ":class:`DMChannel` for DM channels with members." -msgstr "メンバーのDMチャンネル用である :class:`DMChannel` 。" - -#: ../../migrating.rst:290 -msgid ":class:`GroupChannel` for Group DM channels with members." -msgstr "メンバーが参加するグループDMチャンネル用である :class:`GroupChannel` 。" - -#: ../../migrating.rst:292 -msgid "" -"With this split came the removal of the ``is_private`` attribute. You " -"should now use :func:`isinstance`." -msgstr "" -"これらに分割されたことにより、 ``is_private`` は削除されました。v1.0では :func:`isinstance` " -"を使うべきでしょう。" - -#: ../../migrating.rst:294 -msgid "The types are split into two different :ref:`discord_api_abcs`:" -msgstr "型は二通りの :ref:`discord_api_abcs` に分けられます。" - -#: ../../migrating.rst:296 -msgid ":class:`abc.GuildChannel` for guild channels." -msgstr "ギルドのチャンネルを表す :class:`abc.GuildChannel` 。" - -#: ../../migrating.rst:297 -msgid ":class:`abc.PrivateChannel` for private channels (DMs and group DMs)." -msgstr "プライベートチャンネル(DMやグループDM)を表す :class:`abc.PrivateChannel` 。" - -#: ../../migrating.rst:299 -msgid "So to check if something is a guild channel you would do: ::" -msgstr "チャンネルがギルドチャンネルであるかをチェックしたい場合:" - -#: ../../migrating.rst:303 -msgid "And to check if it's a private channel you would do: ::" -msgstr "チャンネルがプライベートチャンネルであるかをチェックしたい場合:" - -#: ../../migrating.rst:307 -msgid "" -"Of course, if you're looking for only a specific type you can pass that " -"too, e.g. ::" -msgstr "もちろん、特定のチャンネルタイプを探したい場合、そのチャンネルタイプを渡すことも可能です。" - -#: ../../migrating.rst:311 -msgid "" -"With this type split also came event changes, which are enumerated in " -":ref:`migrating_1_0_event_changes`." -msgstr "" -"この分割により、イベントにも変更がありました。これについては :ref:`migrating_1_0_event_changes` " -"に詳細があります。" - -#: ../../migrating.rst:315 -msgid "Miscellaneous Model Changes" -msgstr "その他のモデルの変更" - -#: ../../migrating.rst:317 -msgid "There were lots of other things added or removed in the models in general." -msgstr "一般的なモデルには追加、あるいは削除されたものが多くあります。" - -#: ../../migrating.rst:319 -msgid "They will be enumerated here." -msgstr "以下がその一覧です。" - -#: ../../migrating.rst:321 -msgid "**Removed**" -msgstr "**削除**" - -#: ../../migrating.rst:323 -msgid ":meth:`Client.login` no longer accepts email and password logins." -msgstr ":meth:`Client.login` はEメールとパスワードによるログインを受け付けなくなりました。" - -#: ../../migrating.rst:325 -msgid "Use a token and ``bot=False``." -msgstr "トークンと ``bot=False`` を使用してください。" - -#: ../../migrating.rst:329 -msgid "Use :attr:`Client.emojis` instead." -msgstr "代わりに :attr:`Client.emojis` を使用してください。" - -#: ../../migrating.rst:331 -#, fuzzy -msgid "``Client.messages``" -msgstr "` ``Client.messages``" - -#: ../../migrating.rst:333 -msgid "Use read-only :attr:`Client.cached_messages` instead." -msgstr "読み込み専用の :attr:`Client.cached_messages`を代わりに使ってください。" - -#: ../../migrating.rst:335 -msgid "``Client.wait_for_message`` and ``Client.wait_for_reaction`` are gone." -msgstr "``Client.wait_for_message`` および ``Client.wait_for_reaction`` は削除されました。" - -#: ../../migrating.rst:337 -msgid "Use :meth:`Client.wait_for` instead." -msgstr "代わりに :meth:`Client.wait_for` を使用してください。" - -#: ../../migrating.rst:339 -msgid "``Channel.voice_members``" -msgstr "``Channel.voice_members``" - -#: ../../migrating.rst:341 -msgid "Use :attr:`VoiceChannel.members` instead." -msgstr "代わりに :attr:`VoiceChannel.members` を使用してください。" - -#: ../../migrating.rst:343 -msgid "``Channel.is_private``" -msgstr "``Channel.is_private``" - -#: ../../migrating.rst:345 -msgid "" -"Use ``isinstance`` instead with one of the :ref:`discord_api_abcs` " -"instead." -msgstr "代わりに ``isinstance`` と :ref:`discord_api_abcs` を使用してください。" - -#: ../../migrating.rst:346 -msgid "" -"e.g. ``isinstance(channel, discord.abc.GuildChannel)`` will check if it " -"isn't a private channel." -msgstr "" -"例を挙げると ``isinstance(channel, discord.abc.GuildChannel)`` " -"でプライベートチャンネルであるかを確認できます。" - -#: ../../migrating.rst:348 -msgid "``Client.accept_invite``" -msgstr "``Client.accept_invite``" - -#: ../../migrating.rst:350 -msgid "" -"There is no replacement for this one. This functionality is deprecated " -"API wise." -msgstr "これに代わるものはありません。これは非推奨のAPIです。" - -#: ../../migrating.rst:352 -msgid "" -"``Guild.default_channel`` / ``Server.default_channel`` and " -"``Channel.is_default``" -msgstr "" -"``Guild.default_channel`` / ``Server.default_channel`` および " -"``Channel.is_default``" - -#: ../../migrating.rst:354 -msgid "" -"The concept of a default channel was removed from Discord. See `#329 " -"`_." -msgstr "" -"デフォルトチャンネルの概念は、Discordから削除されました。 `#329 " -"`_ " -"を参照してください。" - -#: ../../migrating.rst:357 -msgid "``Message.edited_timestamp``" -msgstr "``Message.edited_timestamp``" - -#: ../../migrating.rst:359 -msgid "Use :attr:`Message.edited_at` instead." -msgstr "代わりに :attr:`Message.edited_at` を使用してください。" - -#: ../../migrating.rst:361 -msgid "``Message.timestamp``" -msgstr "``Message.timestamp``" - -#: ../../migrating.rst:363 -msgid "Use :attr:`Message.created_at` instead." -msgstr "代わりに :attr:`Message.created_at` を使用してください。" - -#: ../../migrating.rst:365 -msgid "``Colour.to_tuple()``" -msgstr "``Colour.to_tuple()``" - -#: ../../migrating.rst:367 -msgid "Use :meth:`Colour.to_rgb` instead." -msgstr "代わりに :meth:`Colour.to_rgb` を使用してください。" - -#: ../../migrating.rst:369 -msgid "``Permissions.view_audit_logs``" -msgstr "``Permissions.view_audit_logs``" - -#: ../../migrating.rst:371 -msgid "Use :attr:`Permissions.view_audit_log` instead." -msgstr "代わりに :attr:`Permissions.view_audit_log` を使用してください。" - -#: ../../migrating.rst:373 -msgid "``Member.game``" -msgstr "``Member.game``" - -#: ../../migrating.rst:375 -msgid "Use :attr:`Member.activities` instead." -msgstr "代わりに :attr:`Member.activities` 使用してください。" - -#: ../../migrating.rst:377 -msgid "``Guild.role_hierarchy`` / ``Server.role_hierarchy``" -msgstr "``Guild.role_hierarchy`` / ``Server.role_hierarchy``" - -#: ../../migrating.rst:379 -msgid "" -"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." -msgstr "" -"代わりに :attr:`Guild.roles` を使用してください。ソート順が以前の ``Guild.role_hierarchy`` " -"とは逆になっていることに注意してください。" - -#: ../../migrating.rst:382 -msgid "**Changed**" -msgstr "**変更**" - -#: ../../migrating.rst:384 -msgid "" -":attr:`Member.avatar_url` and :attr:`User.avatar_url` now return the " -"default avatar if a custom one is not set." -msgstr "" -":attr:`Member.avatar_url` と :attr:`User.avatar_url` " -"はアバターが設定されていなければ、デフォルトアバターが返るようになりました。" - -#: ../../migrating.rst:385 -msgid "" -":attr:`Message.embeds` is now a list of :class:`Embed` instead of " -":class:`dict` objects." -msgstr "" -":attr:`Message.embeds` は :class:`dict` オブジェクトから :class:`Embed` " -"のリストに変更されました。" - -#: ../../migrating.rst:386 -msgid "" -":attr:`Message.attachments` is now a list of :class:`Attachment` instead " -"of :class:`dict` object." -msgstr "" -":attr:`Message.attachments` は :class:`dict` オブジェクトから :class:`Attachment` " -"のリストに変更されました。" - -#: ../../migrating.rst:387 -msgid "" -":attr:`Guild.roles` is now sorted through hierarchy. The first element is" -" always the ``@everyone`` role." -msgstr ":attr:`Guild.roles` はヒエラルキー順にソートされるようになりました。先頭には必ず ``@everyone`` が格納されます。" - -#: ../../migrating.rst:389 -msgid "**Added**" -msgstr "**追加**" - -#: ../../migrating.rst:391 -msgid ":class:`Attachment` to represent a discord attachment." -msgstr "Discordのアタッチメントを表す :class:`Attachment` 。" - -#: ../../migrating.rst:392 -msgid ":class:`CategoryChannel` to represent a channel category." -msgstr "チャンネルのカテゴリを表す :class:`CategoryChannel` 。" - -#: ../../migrating.rst:393 -msgid "" -":attr:`VoiceChannel.members` for fetching members connected to a voice " -"channel." -msgstr "ボイスチャンネルに接続しているメンバーを取得する :attr:`VoiceChannel.members` 。" - -#: ../../migrating.rst:394 -msgid ":attr:`TextChannel.members` for fetching members that can see the channel." -msgstr "テキストチャンネルを閲覧可能なメンバーを取得する :attr:`TextChannel.members` 。" - -#: ../../migrating.rst:395 -msgid ":attr:`Role.members` for fetching members that have the role." -msgstr "役割を持っているメンバーを取得する :attr:`Role.members` 。" - -#: ../../migrating.rst:396 -msgid ":attr:`Guild.text_channels` for fetching text channels only." -msgstr "テキストチャンネルのみを取得する :attr:`Guild.text_channels` 。" - -#: ../../migrating.rst:397 -msgid ":attr:`Guild.voice_channels` for fetching voice channels only." -msgstr "ボイスチャンネルのみを取得する :attr:`Guild.voice_channels` 。" - -#: ../../migrating.rst:398 -msgid ":attr:`Guild.categories` for fetching channel categories only." -msgstr "チャンネルのカテゴリのみを取得する :attr:`Guild.categories` 。" - -#: ../../migrating.rst:399 -msgid "" -":attr:`TextChannel.category` and :attr:`VoiceChannel.category` to get the" -" category a channel belongs to." -msgstr "" -"チャンネルが属するカテゴリを取得する :attr:`TextChannel.category` と " -":attr:`VoiceChannel.category` 。" - -#: ../../migrating.rst:400 -msgid ":meth:`Guild.by_category` to get channels grouped by their category." -msgstr "カテゴリによってグループ化されたチャンネルを取得する :meth:`Guild.by_category` 。" - -#: ../../migrating.rst:401 -msgid ":attr:`Guild.chunked` to check member chunking status." -msgstr "メンバーのチャンク状態を確認する :attr:`Guild.chunked` 。" - -#: ../../migrating.rst:402 -msgid ":attr:`Guild.explicit_content_filter` to fetch the content filter." -msgstr "不適切な表現のフィルターを取得する :attr:`Guild.explicit_content_filter` 。" - -#: ../../migrating.rst:403 -msgid ":attr:`Guild.shard_id` to get a guild's Shard ID if you're sharding." -msgstr "Shardingを使用している場合のみ、ギルドのShard IDを取得する :attr:`Guild.shard_id` 。" - -#: ../../migrating.rst:404 -msgid ":attr:`Client.users` to get all visible :class:`User` instances." -msgstr "Botによってみることができる :class:`User` インスタンスをすべて返す :attr:`Client.users` 。" - -#: ../../migrating.rst:405 -msgid ":meth:`Client.get_user` to get a :class:`User` by ID." -msgstr "IDから :class:`User` を取得する :meth:`Client.get_user` 。" - -#: ../../migrating.rst:406 -msgid ":meth:`User.avatar_url_as` to get an avatar in a specific size or format." -msgstr "特定のサイズ、あるいはフォーマットのアバターを取得する :meth:`User.avatar_url_as` 。" - -#: ../../migrating.rst:407 -msgid ":meth:`Guild.vanity_invite` to fetch the guild's vanity invite." -msgstr "ギルドのカスタム招待URLを取得する :meth:`Guild.vanity_invite` 。" - -#: ../../migrating.rst:408 -msgid ":meth:`Guild.audit_logs` to fetch the guild's audit logs." -msgstr "ギルドのサーバーログを取得する :meth:`Guild.audit_logs` 。" - -#: ../../migrating.rst:409 -msgid ":attr:`Message.webhook_id` to fetch the message's webhook ID." -msgstr "メッセージのWebhook IDを取得する :attr:`Message.webhook_id` 。" - -#: ../../migrating.rst:410 -msgid "" -":attr:`Message.activity` and :attr:`Message.application` for Rich " -"Presence related information." -msgstr "" -"リッチプレゼンスに関する情報を取得する :attr:`Message.activity` および " -":attr:`Message.application` 。" - -#: ../../migrating.rst:411 -msgid ":meth:`TextChannel.is_nsfw` to check if a text channel is NSFW." -msgstr "テキストチャンネルがNSFWであるかを確認する :meth:`TextChannel.is_nsfw` 。" - -#: ../../migrating.rst:412 -msgid ":meth:`Colour.from_rgb` to construct a :class:`Colour` from RGB tuple." -msgstr "RGBのタプルから :class:`Colour` を作成する :meth:`Colour.from_rgb` 。" - -#: ../../migrating.rst:413 -msgid ":meth:`Guild.get_role` to get a role by its ID." -msgstr "IDから役職を取得する :meth:`Guild.get_role` 。" - -#: ../../migrating.rst:418 -msgid "Sending Messages" -msgstr "メッセージの送信" - -#: ../../migrating.rst:420 -msgid "" -"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`." -msgstr "" -"変更点の一つは、以前の ``Client.send_message`` と ``Client.send_file`` の機能を単一のメソッド " -":meth:`~abc.Messageable.send` に統合したことです。" - -#: ../../migrating.rst:423 ../../migrating.rst:1077 -msgid "Basically: ::" -msgstr "基本形" - -#: ../../migrating.rst:431 -msgid "" -"This supports everything that the old ``send_message`` supported such as " -"embeds: ::" -msgstr "これは埋め込みメッセージなどといった、従来の ``send_message`` が持っていた機能を全てサポートしています。" - -#: ../../migrating.rst:436 -msgid "" -"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. ::" -msgstr "" -"これはファイルの送信に対応できるように拡張されましたが、複数のファイルを送信する際には、 :class:`File` " -"の擬似的な名前付きタプルでファイルを渡す必要があります。" - -#: ../../migrating.rst:445 -msgid "This change was to facilitate multiple file uploads: ::" -msgstr "この変更は、複数の添付ファイルの送信を容易にするために行われました。" - -#: ../../migrating.rst:457 -msgid "Asynchronous Iterators" -msgstr "非同期のイテレータ" - -#: ../../migrating.rst:459 -msgid "" -"Prior to v1.0, certain functions like ``Client.logs_from`` would return a" -" different type if done in Python 3.4 or 3.5+." -msgstr "" -"v1.0以前のバージョンは、Python 3.4 または 3.5以上の環境において ``Client.logs_from`` " -"のような特定の関数で、処理終了時に異なった型を返していました。" - -#: ../../migrating.rst:461 -msgid "" -"In v1.0, this change has been reverted and will now return a singular " -"type meeting an abstract concept called :class:`AsyncIterator`." -msgstr "これはv1.0で元に戻り、 :class:`AsyncIterator` という抽象概念を満たす特異な型を返します。" - -#: ../../migrating.rst:464 -msgid "This allows you to iterate over it like normal: ::" -msgstr "これは通常のイテレータと同様の処理が行なえます。" - -#: ../../migrating.rst:469 -msgid "Or turn it into a list: ::" -msgstr "またはリストにできます。" - -#: ../../migrating.rst:475 -msgid "" -"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`: ::" -msgstr "" -":class:`AsyncIterator` を返すことで便利な点は :meth:`AsyncIterator.map` や " -":meth:`AsyncIterator.filter` といった関数をチェーンできることです: ::" - -#: ../../migrating.rst:481 -msgid "" -"The functions passed to :meth:`AsyncIterator.map` or " -":meth:`AsyncIterator.filter` can be either coroutines or regular " -"functions." -msgstr "" -":meth:`AsyncIterator.map` または :meth:`AsyncIterator.filter` " -"に渡される関数はコルーチンか通常の関数です。" - -#: ../../migrating.rst:484 -msgid "" -"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`: ::" -msgstr "" -":meth:`AsyncIterator.get` または :meth:`AsyncIterator.find` を介して " -":func:`discord.utils.get` または :func:`discord.utils.find` " -"で単一の要素を取得することもできます。" - -#: ../../migrating.rst:489 -msgid "The following return :class:`AsyncIterator`:" -msgstr ":class:`AsyncIterator` を返すのは以下のとおりです:" - -#: ../../migrating.rst:491 -msgid ":meth:`abc.Messageable.history`" -msgstr ":meth:`abc.Messageable.history`" - -#: ../../migrating.rst:492 -msgid ":meth:`Guild.audit_logs`" -msgstr ":meth:`Guild.audit_logs`" - -#: ../../migrating.rst:498 ../../migrating.rst:924 -msgid "Event Changes" -msgstr "イベントの変更" - -#: ../../migrating.rst:500 -msgid "A lot of events have gone through some changes." -msgstr "多くのイベントに変更がありました。" - -#: ../../migrating.rst:502 -msgid "" -"Many events with ``server`` in the name were changed to use ``guild`` " -"instead." -msgstr "名前に ``server`` が含まれていたイベントのほとんどが、 ``guild`` を使った名前に変更されました。" - -#: ../../migrating.rst:504 ../../migrating.rst:568 -msgid "Before:" -msgstr "変更前" - -#: ../../migrating.rst:506 -msgid "``on_server_join``" -msgstr "``on_server_join``" - -#: ../../migrating.rst:507 -msgid "``on_server_remove``" -msgstr "``on_server_remove``" - -#: ../../migrating.rst:508 -msgid "``on_server_update``" -msgstr "``on_server_update``" - -#: ../../migrating.rst:509 -msgid "``on_server_role_create``" -msgstr "``on_server_role_create``" - -#: ../../migrating.rst:510 -msgid "``on_server_role_delete``" -msgstr "``on_server_role_delete``" - -#: ../../migrating.rst:511 -msgid "``on_server_role_update``" -msgstr "``on_server_role_update``" - -#: ../../migrating.rst:512 -msgid "``on_server_emojis_update``" -msgstr "``on_server_emojis_update``" - -#: ../../migrating.rst:513 -msgid "``on_server_available``" -msgstr "``on_server_available``" - -#: ../../migrating.rst:514 -msgid "``on_server_unavailable``" -msgstr "``on_server_unavailable``" - -#: ../../migrating.rst:516 ../../migrating.rst:574 -msgid "After:" -msgstr "変更後" - -#: ../../migrating.rst:518 -msgid ":func:`on_guild_join`" -msgstr ":func:`on_guild_join`" - -#: ../../migrating.rst:519 -msgid ":func:`on_guild_remove`" -msgstr ":func:`on_guild_remove`" - -#: ../../migrating.rst:520 -msgid ":func:`on_guild_update`" -msgstr ":func:`on_guild_update`" - -#: ../../migrating.rst:521 -msgid ":func:`on_guild_role_create`" -msgstr ":func:`on_guild_role_create`" - -#: ../../migrating.rst:522 -msgid ":func:`on_guild_role_delete`" -msgstr ":func:`on_guild_role_delete`" - -#: ../../migrating.rst:523 -msgid ":func:`on_guild_role_update`" -msgstr ":func:`on_guild_role_update`" - -#: ../../migrating.rst:524 -msgid ":func:`on_guild_emojis_update`" -msgstr ":func:`on_guild_emojis_update`" - -#: ../../migrating.rst:525 -msgid ":func:`on_guild_available`" -msgstr ":func:`on_guild_available`" - -#: ../../migrating.rst:526 -msgid ":func:`on_guild_unavailable`" -msgstr ":func:`on_guild_unavailable`" - -#: ../../migrating.rst:529 -msgid "The :func:`on_voice_state_update` event has received an argument change." -msgstr ":func:`on_voice_state_update` イベントの引数が変更されました。" - -#: ../../migrating.rst:531 ../../migrating.rst:543 ../../migrating.rst:555 -#: ../../migrating.rst:615 ../../migrating.rst:928 -msgid "Before: ::" -msgstr "更新前" - -#: ../../migrating.rst:535 ../../migrating.rst:547 ../../migrating.rst:559 -#: ../../migrating.rst:627 ../../migrating.rst:934 ../../migrating.rst:1159 -msgid "After: ::" -msgstr "更新後" - -#: ../../migrating.rst:539 -msgid "" -"Instead of two :class:`Member` objects, the new event takes one " -":class:`Member` object and two :class:`VoiceState` objects." -msgstr "" -"新しくなったイベントは、二つの :class:`Member` の代わりに、 一つの :class:`Member` と二つの " -":class:`VoiceState` を受け取るようになりました。" - -#: ../../migrating.rst:541 -msgid "The :func:`on_guild_emojis_update` event has received an argument change." -msgstr ":func:`on_guild_emojis_update` イベントの引数が変更されました。" - -#: ../../migrating.rst:551 -msgid "" -"The first argument is now the :class:`Guild` that the emojis were updated" -" from." -msgstr "最初の引数は絵文字の更新が行われた :class:`Guild` です。" - -#: ../../migrating.rst:553 -msgid "The :func:`on_member_ban` event has received an argument change as well:" -msgstr ":func:`on_member_ban` も引数が変更されました。" - -#: ../../migrating.rst:563 -msgid "" -"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." -msgstr "" -"変更の一つは、イベントが :class:`Member` または :class:`User` のどちらかを受け取れるようになったことです。 " -":class:`User` で受け取る場合には第一引数として :class:`Guild` が渡されます。" - -#: ../../migrating.rst:566 -msgid "" -"The ``on_channel_`` events have received a type level split (see " -":ref:`migrating_1_0_channel_split`)." -msgstr "" -"``on_channel_`` のようなイベントは、チャンネルタイプにより分割されました ( " -":ref:`migrating_1_0_channel_split` を参照)。" - -#: ../../migrating.rst:570 -msgid "``on_channel_delete``" -msgstr "``on_channel_delete``" - -#: ../../migrating.rst:571 -msgid "``on_channel_create``" -msgstr "``on_channel_create``" - -#: ../../migrating.rst:572 -msgid "``on_channel_update``" -msgstr "``on_channel_update``" - -#: ../../migrating.rst:576 -msgid ":func:`on_guild_channel_delete`" -msgstr ":func:`on_guild_channel_delete`" - -#: ../../migrating.rst:577 -msgid ":func:`on_guild_channel_create`" -msgstr ":func:`on_guild_channel_create`" - -#: ../../migrating.rst:578 -msgid ":func:`on_guild_channel_update`" -msgstr ":func:`on_guild_channel_update`" - -#: ../../migrating.rst:579 -msgid ":func:`on_private_channel_delete`" -msgstr ":func:`on_private_channel_delete`" - -#: ../../migrating.rst:580 -msgid ":func:`on_private_channel_create`" -msgstr ":func:`on_private_channel_create`" - -#: ../../migrating.rst:581 -msgid ":func:`on_private_channel_update`" -msgstr ":func:`on_private_channel_update`" - -#: ../../migrating.rst:583 -msgid "" -"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`)." -msgstr "" -"``on_guild_channel_`` イベントは更新される :class:`abc.GuildChannel` " -"(:class:`TextChannel` および :class:`VoiceChannel`)に対応しており、 " -"``on_private_channel_`` イベントは更新される :class:`abc.PrivateChannel` " -"(:class:`DMChannel` および :class:`GroupChannel`)に対応しています。" - -#: ../../migrating.rst:590 -msgid "Voice Changes" -msgstr "ボイスの変更" - -#: ../../migrating.rst:592 -msgid "Voice sending has gone through a complete redesign." -msgstr "ボイスの送信が完全に再構成されました。" - -#: ../../migrating.rst:594 -msgid "In particular:" -msgstr "主な変更点は以下のとおりです。" - -#: ../../migrating.rst:596 -msgid "" -"Connection is done through :meth:`VoiceChannel.connect` instead of " -"``Client.join_voice_channel``." -msgstr "" -"ボイスチャンネルへの接続は ``Client.join_voice_channel`` に代わって " -":meth:`VoiceChannel.connect` になりました。" - -#: ../../migrating.rst:597 -msgid "" -"You no longer create players and operate on them (you no longer store " -"them)." -msgstr "プレイヤーを作成せずに操作が可能になりました。(プレイヤーの保存の必要もありません)" - -#: ../../migrating.rst:598 -msgid "" -"You instead request :class:`VoiceClient` to play an :class:`AudioSource` " -"via :meth:`VoiceClient.play`." -msgstr "" -"代わりに :class:`VoiceClient` の :meth:`VoiceClient.play` を介して " -":class:`AudioSource` の再生を要求します。" - -#: ../../migrating.rst:599 -msgid "There are different built-in :class:`AudioSource`\\s." -msgstr "様々な組み込み :class:`AudioSource` があります。" - -#: ../../migrating.rst:601 -msgid ":class:`FFmpegPCMAudio` is the equivalent of ``create_ffmpeg_player``" -msgstr ":class:`FFmpegPCMAudio` は ``create_ffmpeg_player`` と同等です。" - -#: ../../migrating.rst:603 -msgid "" -"create_ffmpeg_player/create_stream_player/create_ytdl_player have all " -"been removed." -msgstr "create_ffmpeg_player/create_stream_player/create_ytdl_player はすべて削除されました。" - -#: ../../migrating.rst:605 -msgid "The goal is to create :class:`AudioSource` instead." -msgstr "代わりに:class:`AudioSource`を作成してください。" - -#: ../../migrating.rst:607 -msgid "Using :meth:`VoiceClient.play` will not return an ``AudioPlayer``." -msgstr ":meth:`VoiceClient.play` を呼び出しても ``AudioPlayer`` は返ってきません。" - -#: ../../migrating.rst:609 -msgid "Instead, it's \"flattened\" like :class:`User` -> :class:`Member` is." -msgstr "代わりに、:class:`User`と:class:`Member`のように、「フラット化」されています。" - -#: ../../migrating.rst:611 -msgid "The ``after`` parameter now takes a single parameter (the error)." -msgstr "``after``パラメータの関数は、ひとつ引数 (エラー) を取ります。" - -#: ../../migrating.rst:613 -msgid "Basically:" -msgstr "基本的には以下のとおりです:" - -#: ../../migrating.rst:637 -msgid "" -"With the changed :class:`AudioSource` design, you can now change the " -"source that the :class:`VoiceClient` is playing at runtime via " -":attr:`VoiceClient.source`." -msgstr "" -":class:`AudioSource` の再設計により、 :attr:`VoiceClient.source` を介して実行中の " -":class:`VoiceClient` のソースを変更できるようになりました。" - -#: ../../migrating.rst:640 -msgid "" -"For example, you can add a :class:`PCMVolumeTransformer` to allow " -"changing the volume: ::" -msgstr "例えば、 :class:`PCMVolumeTransformer` を追加すると、ボリュームの変更ができるようになります。" - -#: ../../migrating.rst:645 -msgid "" -"An added benefit of the redesign is that it will be much more resilient " -"towards reconnections:" -msgstr "再設計によるさらなる利点は、再接続において遥かに柔軟性を持ったことです。" - -#: ../../migrating.rst:647 -msgid "" -"The voice websocket will now automatically re-connect and re-do the " -"handshake when disconnected." -msgstr "音声ウェブソケットは、切断された際に自動的に再接続し、ハンドシェイクを再実行します。" - -#: ../../migrating.rst:648 -msgid "" -"The initial connect handshake will now retry up to 5 times so you no " -"longer get as many ``asyncio.TimeoutError``." -msgstr "" -"初期接続のハンドシェイクは、最大5回までの再試行となったので、大量の ``asyncio.TimeoutError`` " -"に悩まされることはなくなりました。" - -#: ../../migrating.rst:649 -msgid "Audio will now stop and resume when a disconnect is found." -msgstr "VCの切断を検知すると、オーディオは停止し、再開しようとします。" - -#: ../../migrating.rst:651 -msgid "This includes changing voice regions etc." -msgstr "これはサーバーリージョンの変更も含まれます。" - -#: ../../migrating.rst:657 -msgid "Waiting For Events" -msgstr "イベントの待機" - -#: ../../migrating.rst:659 -msgid "" -"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." -msgstr "" -"v1.0以前のバージョンでは、イベントの発生を待つ方法として ``Client.wait_for_message`` と " -"``Client.wait_for_reaction`` " -"の二つの関数が用意されていました。このアプローチの欠点はライブラリが提供するイベント以外の発生を待つことが出来ない点です。" - -#: ../../migrating.rst:663 -msgid "" -"In v1.0 the concept of waiting for another event has been generalised to " -"work with any event as :meth:`Client.wait_for`." -msgstr "v1.0では別のイベント待機の概念が :meth:`Client.wait_for` イベントのように一般化されました。" - -#: ../../migrating.rst:665 -msgid "For example, to wait for a message: ::" -msgstr "例えば、メッセージを待つ処理は以下のようになります。" - -#: ../../migrating.rst:676 -msgid "" -"To facilitate multiple returns, :meth:`Client.wait_for` returns either a " -"single argument, no arguments, or a tuple of arguments." -msgstr "複数の返り値に対応するため、 :meth:`Client.wait_for` は単一の引数、引数なし、あるいは引数のタプルを返すようになっています。" - -#: ../../migrating.rst:679 -msgid "For example, to wait for a reaction: ::" -msgstr "例えば、リアクションを待つ処理は以下のようになります。" - -#: ../../migrating.rst:685 -msgid "" -"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:" -msgstr "" -"この関数は複数の引数を返すため、 ``timeout`` に設定した時間経過すると、 ``None`` を返すのではなく、 " -":exc:`asyncio.TimeoutError` を発生させるようになりました。以下はその例になります。" - -#: ../../migrating.rst:702 -msgid "Upgraded Dependencies" -msgstr "依存関係のアップグレード" - -#: ../../migrating.rst:704 -msgid "" -"Following v1.0 of the library, we've updated our requirements to " -":doc:`aiohttp ` v2.0 or higher." -msgstr "ライブラリのv1.0への更新に伴い、要件が :doc:`aiohttp ` v2.0以上へと変更されました。" - -#: ../../migrating.rst:706 -msgid "" -"Since this is a backwards incompatible change, it is recommended that you" -" see the `changes " -"`_ " -"and the :doc:`aio:migration_to_2xx` pages for details on the breaking " -"changes in :doc:`aiohttp `." -msgstr "" -"これは後方互換性のない変更となるため、 :doc:`aiohttp ` の変更点の詳細については `changes " -"`_ と" -" :doc:`aio:migration_to_2xx` ページを参照してください。" - -#: ../../migrating.rst:711 -msgid "" -"Of the most significant for common users is the removal of helper " -"functions such as:" -msgstr "ユーザーにとって最も重要な変更点は、以下のヘルパー関数の削除です。" - -#: ../../migrating.rst:713 -msgid "``aiohttp.get``" -msgstr "``aiohttp.get``" - -#: ../../migrating.rst:714 -msgid "``aiohttp.post``" -msgstr "``aiohttp.post``" - -#: ../../migrating.rst:715 -msgid "``aiohttp.delete``" -msgstr "``aiohttp.delete``" - -#: ../../migrating.rst:716 -msgid "``aiohttp.patch``" -msgstr "``aiohttp.patch``" - -#: ../../migrating.rst:717 -msgid "``aiohttp.head``" -msgstr "``aiohttp.head``" - -#: ../../migrating.rst:718 -msgid "``aiohttp.put``" -msgstr "``aiohttp.put``" - -#: ../../migrating.rst:719 -msgid "``aiohttp.request``" -msgstr "``aiohttp.request``" - -#: ../../migrating.rst:721 -msgid "It is recommended that you create a session instead: ::" -msgstr "代わりにセッションを作成することをお勧めします。" - -#: ../../migrating.rst:727 -msgid "" -"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." -msgstr "" -"リクエストごとにセッションを作成するのは良いとは言えないため、変数に格納しておき、破棄しなければならない時に ``session.close`` " -"を呼び出すのが良いでしょう。" - -#: ../../migrating.rst:731 -msgid "Sharding" -msgstr "シャーディング" - -#: ../../migrating.rst:733 -msgid "" -"The library has received significant changes on how it handles sharding " -"and now has sharding as a first-class citizen." -msgstr "シャーディングの扱いに対して大きな変更があり、現在、シャーディングは第一級オブジェクトとして扱われています。" - -#: ../../migrating.rst:735 -msgid "" -"If using a Bot account and you want to shard your bot in a single process" -" then you can use the :class:`AutoShardedClient`." -msgstr "" -"Botアカウントを使用していて、かつ一つのプロセスでBotをシャーディングしたい場合は、 :class:`AutoShardedClient` " -"を使用してください。" - -#: ../../migrating.rst:737 -msgid "" -"This class allows you to use sharding without having to launch multiple " -"processes or deal with complicated IPC." -msgstr "このクラスは複数のプロセスを起動したり、IPCを処理することなくシャーディングが行えます。" - -#: ../../migrating.rst:739 -msgid "" -"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." -msgstr "シャーディングしたクライアントはユーザーアカウントをサポートしないことを覚えておきましょう。これは、接続の形態と状態処理の変更によるものです。" - -#: ../../migrating.rst:742 -msgid "Usage is as simple as doing: ::" -msgstr "使い方は簡単です。" - -#: ../../migrating.rst:746 -msgid "instead of using :class:`Client`." -msgstr ":class:`Client` の代わりに上記のようにしてください。" - -#: ../../migrating.rst:748 -msgid "" -"This will launch as many shards as your bot needs using the " -"``/gateway/bot`` endpoint, which allocates about 1000 guilds per shard." -msgstr "" -"これは ``/gateway/bot`` " -"エンドポイントを使って、あなたのBotに必要な数のシャードを起動します。このエンドポイントはシャードごとに1000ギルドを割り当てます。" - -#: ../../migrating.rst:751 -msgid "" -"If you want more control over the sharding you can specify " -"``shard_count`` and ``shard_ids``. ::" -msgstr "シャードをより詳細に制御したい場合は、 ``shard_count`` と ``shard_ids`` を利用してください。" - -#: ../../migrating.rst:759 -msgid "" -"For users of the command extension, there is also " -":class:`~ext.commands.AutoShardedBot` which behaves similarly." -msgstr "" -"コマンド拡張を利用しているユーザーのために、同様に動作する :class:`~ext.commands.AutoShardedBot` " -"が用意されています。" - -#: ../../migrating.rst:762 -msgid "Connection Improvements" -msgstr "接続の改善" - -#: ../../migrating.rst:764 -msgid "In v1.0, the auto reconnection logic has been powered up significantly." -msgstr "v1.0では、自動再接続機能が大幅に強化されました。" - -#: ../../migrating.rst:766 -msgid "" -":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." -msgstr "" -":meth:`Client.connect` には新しいキーワード引数が追加されました。再接続機能の設定を行う ``reconnect`` " -"はデフォルトで ``True`` " -"に設定されています。有効にすると、クライアントは全インターネットのインスタンスがオフラインになった際や、Discordが指数関数的後退によってオフラインになった際に自動で再接続を試みます。" - -#: ../../migrating.rst:770 -msgid "" -":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." -msgstr "" -":meth:`Client.run` や :meth:`Client.start` " -"にも同様のキーワード引数が追加されていますが、このさい接続機能をオフにする場合以外は指定する必要はありません。" - -#: ../../migrating.rst:776 -msgid "Command Extension Changes" -msgstr "コマンド拡張の変更" - -#: ../../migrating.rst:778 -msgid "" -"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." -msgstr ":ref:`migrating_1_0_model_state` により、拡張モジュールの設計にもいくつかの変更があります。" - -#: ../../migrating.rst:782 -msgid "Context Changes" -msgstr "コンテキストの変更" - -#: ../../migrating.rst:784 -msgid "" -"In v1.0, the :class:`.Context` has received a lot of changes with how " -"it's retrieved and used." -msgstr "v1.0において、 :class:`.Context` は取得と利用の面において、多くの変更があります。" - -#: ../../migrating.rst:786 -msgid "" -"The biggest change is that ``pass_context=True`` no longer exists, " -":class:`.Context` is always passed. Ergo:" -msgstr "" -"最も大きな変更点は ``pass_context=True`` が廃止され、常に :class:`.Context` " -"が渡されるようになったことです。そのため以下のようになります。" - -#: ../../migrating.rst:800 -msgid "" -"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." -msgstr "" -"その理由として、 :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` を参照してください。" - -#: ../../migrating.rst:806 -msgid "" -"Since the :class:`~ext.commands.Context` is now passed by default, " -"several shortcuts have been added:" -msgstr ":class:`~ext.commands.Context`がデフォルトで渡されるので、ショートカットが追加されました:" - -#: ../../migrating.rst:808 -msgid "**New Shortcuts**" -msgstr "**新しいショートカット**" - -#: ../../migrating.rst:810 -msgid "" -":attr:`ctx.author ` is a shortcut for " -"``ctx.message.author``." -msgstr "" -":attr:`ctx.author ` は " -"``ctx.message.author``のショートカットです。" - -#: ../../migrating.rst:811 -msgid "" -":attr:`ctx.guild ` is a shortcut for " -"``ctx.message.guild``." -msgstr "" -":attr:`ctx.guild ` は " -"``ctx.message.guild``のショートカットです。" - -#: ../../migrating.rst:812 -msgid "" -":attr:`ctx.channel ` is a shortcut for " -"``ctx.message.channel``." -msgstr "" -":attr:`ctx.channel ` は " -"``ctx.message.channel``のショートカットです。" - -#: ../../migrating.rst:813 -msgid "" -":attr:`ctx.me ` is a shortcut for " -"``ctx.message.guild.me`` or ``ctx.bot.user``." -msgstr "" -":attr:`ctx.me ` は " -"``ctx.message.guild.me``のショートカットです。" - -#: ../../migrating.rst:814 -msgid "" -":attr:`ctx.voice_client ` is a " -"shortcut for ``ctx.message.guild.voice_client``." -msgstr "" -":attr:`ctx.voice_client ` は " -"``ctx.message.guild.voice_client``のショートカットです。" - -#: ../../migrating.rst:816 -msgid "**New Functionality**" -msgstr "**新しい機能**" - -#: ../../migrating.rst:818 -msgid ":meth:`.Context.reinvoke` to invoke a command again." -msgstr ":meth:`.Context.reinvoke` はコマンドを再度呼び出します。" - -#: ../../migrating.rst:820 -msgid "This is useful for bypassing cooldowns." -msgstr "クールダウンの回避に利用できます。" - -#: ../../migrating.rst:821 -msgid "" -":attr:`.Context.valid` to check if a context can be invoked with " -":meth:`.Bot.invoke`." -msgstr ":attr:`.Context.valid`で、:meth:`.Bot.invoke`で呼びだせるか確認します。" - -#: ../../migrating.rst:822 -msgid "" -":meth:`.Context.send_help` to show the help command for an entity using " -"the new :class:`~.ext.commands.HelpCommand` system." -msgstr ":meth:`.Context.send_help`を使うと、新しい:class:`~.ext.commands.HelpCommand`システムである項目のヘルプを出力できます。" - -#: ../../migrating.rst:824 -msgid "" -"This is useful if you want to show the user help if they misused a " -"command." -msgstr "コマンドの使用法を誤ったときにヘルプを表示させたい場合に便利です。" - -#: ../../migrating.rst:827 -msgid "Subclassing Context" -msgstr "コンテキストのサブクラス" - -#: ../../migrating.rst:829 -msgid "" -"In v1.0, there is now the ability to subclass " -":class:`~ext.commands.Context` and use it instead of the default provided" -" one." -msgstr "" -"v1.0では、 :class:`~ext.commands.Context` " -"を継承したサブクラスを作成し、デフォルトで実装されているものの代わりに使うことが出来ます。" - -#: ../../migrating.rst:832 -msgid "For example, if you want to add some functionality to the context:" -msgstr "例えば、コンテキストに機能の追加を行いたい場合は以下のように実装が出来ます。" - -#: ../../migrating.rst:841 -msgid "" -"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:" -msgstr "" -"また、 :func:`on_message` 内で :meth:`~ext.commands.Bot.get_context` と " -":meth:`~ext.commands.Bot.invoke` を組み合わせることであなたのカスタムコンテキストを使用できます。" - -#: ../../migrating.rst:851 -msgid "Now inside your commands you will have access to your custom context:" -msgstr "これにより、コマンドからあなたのカスタムコンテキストにアクセスすることが可能です。" - -#: ../../migrating.rst:862 -msgid "Removed Helpers" -msgstr "ヘルパー関数の削除" - -#: ../../migrating.rst:864 -msgid "" -"With the new :class:`.Context` changes, a lot of message sending helpers " -"have been removed." -msgstr "新しい :class:`.Context` の変更によって、たくさんのメッセージ送信用のヘルパー関数が削除されました。" - -#: ../../migrating.rst:866 -msgid "For a full list of changes, see below:" -msgstr "以下が削除された関数のリストです。" - -#: ../../migrating.rst:871 -msgid "``Bot.say``" -msgstr "``Bot.say``" - -#: ../../migrating.rst:871 ../../migrating.rst:873 -msgid ":meth:`.Context.send`" -msgstr ":meth:`.Context.send`" - -#: ../../migrating.rst:873 -msgid "``Bot.upload``" -msgstr "``Bot.upload``" - -#: ../../migrating.rst:875 -msgid "``Bot.whisper``" -msgstr "``Bot.whisper``" - -#: ../../migrating.rst:875 -msgid "``ctx.author.send``" -msgstr "``ctx.author.send``" - -#: ../../migrating.rst:877 -msgid "``Bot.type``" -msgstr "``Bot.type``" - -#: ../../migrating.rst:877 -msgid ":meth:`.Context.typing` or :meth:`.Context.trigger_typing`" -msgstr ":meth:`.Context.typing` または :meth:`.Context.trigger_typing`" - -#: ../../migrating.rst:879 -msgid "``Bot.reply``" -msgstr "``Bot.reply``" - -#: ../../migrating.rst:879 -msgid "No replacement." -msgstr "代替となるものはありません。" - -#: ../../migrating.rst:883 -msgid "Command Changes" -msgstr "コマンドの変更" - -#: ../../migrating.rst:885 -msgid "" -"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." -msgstr "前述の通り、 ``pass_context=True`` は削除されたため、これをパラメータとして渡す必要はありません。" - -#: ../../migrating.rst:888 -msgid "" -"Another change is the removal of ``no_pm=True``. Instead, use the new " -":func:`~ext.commands.guild_only` built-in check." -msgstr "" -"他に ``no_pm=True`` も削除されました。代わりに新しい組み込みチェックである " -":func:`~ext.commands.guild_only` を使用してください。" - -#: ../../migrating.rst:891 -msgid "" -"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." -msgstr "" -":class:`~ext.commands.Bot` と :class:`~ext.commands.Group` の ``commands`` " -"属性は辞書からエイリアスを持たないsetに変更されました。以前のような辞書を取得するには ``all_commands`` を使用してください。" - -#: ../../migrating.rst:894 -msgid "Command instances have gained new attributes and properties:" -msgstr "コマンドインスタンスには新たな属性とプロパティが追加されました。" - -#: ../../migrating.rst:896 -msgid "" -":attr:`~ext.commands.Command.signature` to get the signature of the " -"command." -msgstr "コマンドのシグネチャを取得する :attr:`~ext.commands.Command.signature` 。" - -#: ../../migrating.rst:897 -msgid ":attr:`~.Command.usage`, an attribute to override the default signature." -msgstr "デフォルトのシグネチャをオーバーライドする属性 :attr:`~.Command.usage` 。" - -#: ../../migrating.rst:898 -msgid "" -":attr:`~.Command.root_parent` to get the root parent group of a " -"subcommand." -msgstr "サブコマンドのルートである親グループを取得する :attr:`~.Command.root_parent` 。" - -#: ../../migrating.rst:900 -msgid "" -"For :class:`~ext.commands.Group` and :class:`~ext.commands.Bot` the " -"following changed:" -msgstr ":class:`~ext.commands.Group` と :class:`~ext.commands.Bot` は次のように変更されました。" - -#: ../../migrating.rst:902 -msgid "" -"Changed :attr:`~.GroupMixin.commands` to be a :class:`set` without " -"aliases." -msgstr ":attr:`~.GroupMixin.commands` は エイリアスなしの :class:`set` に変更されました。" - -#: ../../migrating.rst:904 -msgid "" -"Use :attr:`~.GroupMixin.all_commands` to get the old :class:`dict` with " -"all commands." -msgstr "" -"すべてのコマンドを従来の :class:`dict` で取得するには :attr:`~.GroupMixin.all_commands` " -"を使用してください。" - -#: ../../migrating.rst:907 -msgid "Check Changes" -msgstr "チェックの変更" - -#: ../../migrating.rst:909 -msgid "" -"Prior to v1.0, :func:`~ext.commands.check`\\s could only be synchronous. " -"As of v1.0 checks can now be coroutines." -msgstr "" -"v1.0以前のバージョンでは :func:`~ext.commands.check` は同期関数でしたが、 " -"v1.0のチェックはコルーチンになりました。" - -#: ../../migrating.rst:911 -msgid "Along with this change, a couple new checks were added." -msgstr "この変更に加え、新たなチェックが二つ追加されました。" - -#: ../../migrating.rst:913 -msgid "" -":func:`~ext.commands.guild_only` replaces the old ``no_pm=True`` " -"functionality." -msgstr "``no_pm=True`` の代わりとなる :func:`~ext.commands.guild_only` 。" - -#: ../../migrating.rst:914 -msgid "" -":func:`~ext.commands.is_owner` uses the :meth:`Client.application_info` " -"endpoint by default to fetch owner ID." -msgstr "" -":func:`~ext.commands.is_owner` は :meth:`Client.application_info` " -"のエンドポイントを使用してオーナーIDを取得します。" - -#: ../../migrating.rst:916 -msgid "" -"This is actually powered by a different function, " -":meth:`~ext.commands.Bot.is_owner`." -msgstr "実際には :meth:`~ext.commands.Bot.is_owner` という別の関数を使用して実行されます。" - -#: ../../migrating.rst:917 -msgid "You can set the owner ID yourself by setting :attr:`.Bot.owner_id`." -msgstr ":attr:`.Bot.owner_id` に値を指定することで自分でオーナーIDの設定ができます。" - -#: ../../migrating.rst:919 -msgid "" -":func:`~ext.commands.is_nsfw` checks if the channel the command is in is " -"a NSFW channel." -msgstr ":func:`~ext.commands.is_nsfw` はコマンドが実行されたチャンネルがNSFWチャンネルかどうかをチェックします。" - -#: ../../migrating.rst:921 -msgid "This is powered by the new :meth:`TextChannel.is_nsfw` method." -msgstr "これは新しく追加された :meth:`TextChannel.is_nsfw` メソッドにより実行されています。" - -#: ../../migrating.rst:926 -msgid "All command extension events have changed." -msgstr "すべてのコマンド拡張のイベントが変更されました。" - -#: ../../migrating.rst:940 -msgid "" -"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." -msgstr "" -":func:`.on_command` と :func:`.on_command_completion` の ``command`` " -"パラメータが削除されました。 :class:`~ext.commands.Command` " -"インスタンスは更新されておらず、正しいものではありませんでした。最新の :class:`~ext.commands.Command` " -"インスタンスを取得するには :attr:`.Context.command` 属性を使用してください。" - -#: ../../migrating.rst:945 -msgid "" -"The error handlers, either :meth:`.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." -msgstr "" -":meth:`.Command.error` や :func:`.on_command_error` " -"のようなエラーハンドラは他のイベント及びコマンドとの一貫性を保つため、最初のパラメータとして " -":class:`~ext.commands.Context` を使用するよう変更されました。" - -#: ../../migrating.rst:950 -msgid "HelpFormatter and Help Command Changes" -msgstr "HelpFormatter および Help Command の変更" - -#: ../../migrating.rst:952 -msgid "" -"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." -msgstr "" -"``HelpFormatter`` クラスは削除され、 :class:`~.commands.HelpCommand` " -"に置き換えられました。このクラスはヘルプコマンドのコマンドハンドリングや処理などといったすべてが格納されています。" - -#: ../../migrating.rst:954 -msgid "" -"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``." -msgstr "" -"ヘルプコマンドは属性である :attr:`.Bot.help_command` に格納されています。追加の機能として、この属性に ``None``" -" を代入するか、 ``help_command=None`` のようにして ``__init__`` " -"にわたすことでヘルプコマンドを完全に無効化できます。" - -#: ../../migrating.rst:956 -msgid "" -"The new interface allows the help command to be customised through " -"special methods that can be overridden." -msgstr "新しいインタフェースでは特殊なメソッドをオーバーライドすることでヘルプコマンドをカスタマイズすることができます。" - -#: ../../migrating.rst:958 -msgid ":meth:`.HelpCommand.send_bot_help`" -msgstr ":meth:`.HelpCommand.send_bot_help`" - -#: ../../migrating.rst:959 -msgid "Called when the user requested for help with the entire bot." -msgstr "ユーザーがBot全体のヘルプを要求した際に呼び出されます。" - -#: ../../migrating.rst:960 -msgid ":meth:`.HelpCommand.send_cog_help`" -msgstr ":meth:`.HelpCommand.send_cog_help`" - -#: ../../migrating.rst:961 -msgid "Called when the user requested for help with a specific cog." -msgstr "ユーザーが特定のコグについてのヘルプを要求した際に呼び出されます。" - -#: ../../migrating.rst:962 -msgid ":meth:`.HelpCommand.send_group_help`" -msgstr ":meth:`.HelpCommand.send_group_help`" - -#: ../../migrating.rst:963 -msgid "Called when the user requested for help with a :class:`~.commands.Group`" -msgstr "ユーザーが :class:`~.commands.Group` についてのヘルプを要求した際に呼び出されます。" - -#: ../../migrating.rst:964 -msgid ":meth:`.HelpCommand.send_command_help`" -msgstr ":meth:`.HelpCommand.send_command_help`" - -#: ../../migrating.rst:965 -msgid "Called when the user requested for help with a :class:`~.commands.Command`" -msgstr "ユーザーが :class:`~.commands.Command` についてのヘルプを要求した際に呼び出されます。" - -#: ../../migrating.rst:966 -msgid ":meth:`.HelpCommand.get_destination`" -msgstr ":meth:`.HelpCommand.get_destination`" - -#: ../../migrating.rst:967 -msgid "" -"Called to know where to send the help messages. Useful for deciding " -"whether to DM or not." -msgstr "ヘルプメッセージの送信先を知るために呼び出されます。DMとして送るかどうかを決める際に役立ちます。" - -#: ../../migrating.rst:968 -msgid ":meth:`.HelpCommand.command_not_found`" -msgstr ":meth:`.HelpCommand.command_not_found`" - -#: ../../migrating.rst:969 -msgid "" -"A function (or coroutine) that returns a presentable no command found " -"string." -msgstr "表示可能なコマンドが見つからなかった旨の文字列を返す関数(またはコルーチン)。" - -#: ../../migrating.rst:970 -msgid ":meth:`.HelpCommand.subcommand_not_found`" -msgstr ":meth:`.HelpCommand.subcommand_not_found`" - -#: ../../migrating.rst:971 -msgid "" -"A function (or coroutine) that returns a string when a subcommand is not " -"found." -msgstr "表示可能なサブコマンドが見つからなかった旨の文字列を返す関数(またはコルーチン)。" - -#: ../../migrating.rst:973 -msgid ":meth:`.HelpCommand.send_error_message`" -msgstr ":meth:`.HelpCommand.send_error_message`" - -#: ../../migrating.rst:973 -msgid "" -"A coroutine that gets passed the result of " -":meth:`.HelpCommand.command_not_found` and " -":meth:`.HelpCommand.subcommand_not_found`." -msgstr "" -":meth:`.HelpCommand.command_not_found` および " -":meth:`.HelpCommand.subcommand_not_found` の結果が渡されるコルーチン。" - -#: ../../migrating.rst:974 -msgid "" -"By default it just sends the message. But you can, for example, override " -"it to put it in an embed." -msgstr "デフォルトではメッセージの送信のみを行いますが、たとえば、そのメッセージを埋め込み化したい場合などにオーバーライドして使うことができます。" - -#: ../../migrating.rst:975 -msgid ":meth:`.HelpCommand.on_help_command_error`" -msgstr ":meth:`.HelpCommand.on_help_command_error`" - -#: ../../migrating.rst:976 -msgid "" -"The :ref:`error handler ` for the help " -"command if you want to add one." -msgstr "ヘルプコマンドの :ref:`エラーハンドラ ` 。追加したい場合のみ使用してください。" - -#: ../../migrating.rst:978 -msgid ":meth:`.HelpCommand.prepare_help_command`" -msgstr ":meth:`.HelpCommand.prepare_help_command`" - -#: ../../migrating.rst:978 -msgid "" -"A coroutine that is called right before the help command processing is " -"done." -msgstr "ヘルプコマンドの処理が行われる前に呼び出されるコルーチン。" - -#: ../../migrating.rst:980 -msgid "Certain subclasses can implement more customisable methods." -msgstr "特定のサブクラスはさらにカスタマイズ可能なメソッドを実装できます。" - -#: ../../migrating.rst:982 -msgid "" -"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." -msgstr "" -"以前の ``HelpFormatter`` はその機能を全て実装した :class:`~.commands.DefaultHelpCommand`" -" に置き換えられました。カスタマイズメソッドは添付のドキュメントで確認することができます。" - -#: ../../migrating.rst:984 -msgid "" -"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." -msgstr "" -"このライブラリは多くのスペースをとらない、より小規模化した :class:`~.commands.HelpCommand` の実装である " -":class:`~.commands.MinimalHelpCommand` " -"を提供します。カスタマイズ可能なメソッドは付随のドキュメントから確認することが可能です。" - -#: ../../migrating.rst:986 -msgid "" -"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." -msgstr "" -"ヘルプコマンドをコグに関連付けることはできないのかという要望が多くありました。この新しい設計では :attr:`.HelpCommand.cog`" -" " -"にバインドすることでコグを動的に変更することが可能です。この割当をおこなった後、ヘルプコマンドはコグの一部として、期待通りの動きをするでしょう。コグがアンロードされると、ヘルプコマンドはコグから「バインド解除」されます。" - -#: ../../migrating.rst:988 -msgid "" -"For example, to implement a :class:`~.commands.HelpCommand` in a cog, the" -" following snippet can be used." -msgstr "例えば、 :class:`~.commands.HelpCommand` をコグに実装するには、次のコードが役立つでしょう。" - -#: ../../migrating.rst:1005 -msgid "" -"For more information, check out the relevant :ref:`documentation " -"`." -msgstr "詳しくは、:ref:`こちらの説明 `をご覧ください。" - -#: ../../migrating.rst:1008 -msgid "Cog Changes" -msgstr "コグの変更" - -#: ../../migrating.rst:1010 -msgid "" -"Cogs have completely been revamped. They are documented in " -":ref:`ext_commands_cogs` as well." -msgstr "コグは完全に刷新されました。これは :ref:`ext_commands_cogs` としてドキュメント化されています。" - -#: ../../migrating.rst:1012 -msgid "" -"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." -msgstr "" -"コグは将来的な校正のためのクラスである :class:`~.commands.Cog` " -"を基底クラスとして持つ必要があります。このクラスには動作のカスタマイズのために、特別なメソッドが用意されています。" - -#: ../../migrating.rst:1014 -msgid ":meth:`.Cog.cog_unload`" -msgstr ":meth:`.Cog.cog_unload`" - -#: ../../migrating.rst:1015 -msgid "" -"This is called when a cog needs to do some cleanup, such as cancelling a " -"task." -msgstr "これはタスクのキャンセルのような、コグに何らかのクリーンアップが必要なときに呼び出されます。" - -#: ../../migrating.rst:1016 -msgid ":meth:`.Cog.bot_check_once`" -msgstr ":meth:`.Cog.bot_check_once`" - -#: ../../migrating.rst:1017 -msgid "This registers a :meth:`.Bot.check_once` check." -msgstr "これは :meth:`.Bot.check_once` チェックを登録します。" - -#: ../../migrating.rst:1018 -msgid ":meth:`.Cog.bot_check`" -msgstr ":meth:`.Cog.bot_check`" - -#: ../../migrating.rst:1019 -msgid "This registers a regular :meth:`.Bot.check` check." -msgstr "これは普通の :meth:`.Bot.check` チェックを登録します。" - -#: ../../migrating.rst:1020 -msgid ":meth:`.Cog.cog_check`" -msgstr ":meth:`.Cog.cog_check`" - -#: ../../migrating.rst:1021 -msgid "This registers a check that applies to every command in the cog." -msgstr "これはコグのすべてのコマンドに適用されるチェックを登録します。" - -#: ../../migrating.rst:1022 -msgid ":meth:`.Cog.cog_command_error`" -msgstr ":meth:`.Cog.cog_command_error`" - -#: ../../migrating.rst:1023 -msgid "" -"This is a special error handler that is called whenever an error happens " -"inside the cog." -msgstr "これは特別なエラーハンドラで、コグ内でエラーが発生するたびに呼び出されます。" - -#: ../../migrating.rst:1025 -msgid ":meth:`.Cog.cog_before_invoke` and :meth:`.Cog.cog_after_invoke`" -msgstr ":meth:`.Cog.cog_before_invoke` と :meth:`.Cog.cog_after_invoke`" - -#: ../../migrating.rst:1025 -msgid "" -"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`." -msgstr "" -"コグの前後に呼び出されるフックを登録する特別なメソッド。詳細は :ref:`migrating_1_0_before_after_hook` " -"に記載されています。" - -#: ../../migrating.rst:1027 -msgid "" -"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." -msgstr "" -"コグ内で ``on_message`` のようなリスナーを使用していた人は、 :meth:`.commands.Cog.listener` " -"デコレータを用いて、リスナーを明示する必要があります。" - -#: ../../migrating.rst:1029 -msgid "" -"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`." -msgstr "それによって、コグはクラス定義の行で指定することによって、独自の名前を持てるようになりました。オプションはこれらを容易にするメタクラス、:class:`.commands.CogMeta`で見つかります。" - -#: ../../migrating.rst:1031 -msgid "" -"An example cog with every special method registered and a custom name is " -"as follows:" -msgstr "すべての特別なメソッドを使用し、そして名前を指定したコグの例が以下のようになります:" - -#: ../../migrating.rst:1068 -msgid "Before and After Invocation Hooks" -msgstr "前後処理のフック" - -#: ../../migrating.rst:1070 -msgid "" -"Commands have gained new before and after invocation hooks that allow you" -" to do an action before and after a command is run." -msgstr "コマンドに、コマンドの実行前および実行後に処理が行えるようにするフックが新たに追加されました。" - -#: ../../migrating.rst:1073 -msgid "" -"They take a single parameter, :class:`~ext.commands.Context` and they " -"must be a coroutine." -msgstr "これは単一のパラメータとして :class:`~ext.commands.Context` を受け取り、かつコルーチンである必要があります。" - -#: ../../migrating.rst:1075 -msgid "They are on a global, per-cog, or per-command basis." -msgstr "また、このフックは全体、コグごと、あるいはコマンドごとに設定することが可能です。" - -#: ../../migrating.rst:1092 -msgid "" -"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." -msgstr "" -"後処理のフックは **コマンドのエラー発生に関わらず** " -"必ず呼び出されます。そのため、データベース接続のようなリソースのクリーンアップやエラー処理に最適です。" - -#: ../../migrating.rst:1095 -msgid "The per-command registration is as follows: ::" -msgstr "コマンドごとに設定する方法は以下のとおりです。" - -#: ../../migrating.rst:1111 -msgid "" -"The special cog method for these is :meth:`.Cog.cog_before_invoke` and " -":meth:`.Cog.cog_after_invoke`, e.g.:" -msgstr "" -"これらのコグ用の特別なメソッドは:meth:`.Cog.cog_before_invoke` と " -":meth:`.Cog.cog_after_invoke`です。例:" - -#: ../../migrating.rst:1126 -msgid "" -"To check if a command failed in the after invocation hook, you can use " -":attr:`.Context.command_failed`." -msgstr ":attr:`.Context.command_failed` を使うことで、後処理でコマンドがエラーになったかを確認する事ができます。" - -#: ../../migrating.rst:1129 -msgid "The invocation order is as follows:" -msgstr "呼び出される順序は以下のとおりです。" - -#: ../../migrating.rst:1131 -msgid "Command local before invocation hook" -msgstr "コマンドごとの前処理。" - -#: ../../migrating.rst:1132 -msgid "Cog local before invocation hook" -msgstr "コグごとの前処理。" - -#: ../../migrating.rst:1133 -msgid "Global before invocation hook" -msgstr "全体での前処理。" - -#: ../../migrating.rst:1134 -msgid "The actual command" -msgstr "実行されたコマンド。" - -#: ../../migrating.rst:1135 -msgid "Command local after invocation hook" -msgstr "コマンドごとの後処理。" - -#: ../../migrating.rst:1136 -msgid "Cog local after invocation hook" -msgstr "コグごとの後処理。" - -#: ../../migrating.rst:1137 -msgid "Global after invocation hook" -msgstr "全体での後処理。" - -#: ../../migrating.rst:1140 -msgid "Converter Changes" -msgstr "コンバーターの変更" - -#: ../../migrating.rst:1142 -msgid "" -"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." -msgstr "v1.0以前では、コンバーターはユーザーにより渡された引数を、文字列の単独引数として呼び出す型ヒントでした。" - -#: ../../migrating.rst:1145 -msgid "" -"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." -msgstr "" - -#: ../../migrating.rst:1149 -msgid "" -"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." -msgstr "" -"v1.0ではこのコンバーターシステムは :class:`~ext.commands.Converter` " -"派生のクラスを用いることができるよう変更されました。一貫性を保つため、 " -":meth:`~ext.commands.Converter.convert` は常にコルーチンとるよう変更され、二つのパラメータを受け取ります。" - -#: ../../migrating.rst:1153 -msgid "Essentially, before: ::" -msgstr "更新前: ::" - -#: ../../migrating.rst:1165 -msgid "The command framework also got a couple new converters:" -msgstr "コマンドフレームワークにも二つのコンバーターが追加されました。" - -#: ../../migrating.rst:1167 -msgid "" -":class:`~ext.commands.clean_content` this is akin to " -":attr:`Message.clean_content` which scrubs mentions." -msgstr "" - -#: ../../migrating.rst:1168 -msgid "" -":class:`~ext.commands.UserConverter` will now appropriately convert " -":class:`User` only." -msgstr ":class:`~ext.commands.UserConverter` は :class:`User` だけを適切に変換します。" - -#: ../../migrating.rst:1169 -msgid "``ChannelConverter`` is now split into two different converters." -msgstr "``ChannelConverter`` は二つのコンバーターに分離されました。" - -#: ../../migrating.rst:1171 -msgid ":class:`~ext.commands.TextChannelConverter` for :class:`TextChannel`." -msgstr ":class:`TextChannel` 用の :class:`~ext.commands.TextChannelConverter` 。" - -#: ../../migrating.rst:1172 -msgid ":class:`~ext.commands.VoiceChannelConverter` for :class:`VoiceChannel`." -msgstr ":class:`VoiceChannel` 用の :class:`~ext.commands.VoiceChannelConverter` 。" - diff --git a/docs/locale/ja/LC_MESSAGES/migrating_to_async.po b/docs/locale/ja/LC_MESSAGES/migrating_to_async.po deleted file mode 100644 index 3321f507..00000000 --- a/docs/locale/ja/LC_MESSAGES/migrating_to_async.po +++ /dev/null @@ -1,363 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: migrating_to_async.pot\n" -"X-Crowdin-File-ID: 48\n" -"Language: ja_JP\n" - -#: ../../migrating_to_async.rst:8 -msgid "Migrating to v0.10.0" -msgstr "v0.10.0への移行" - -#: ../../migrating_to_async.rst:10 -msgid "v0.10.0 is one of the biggest breaking changes in the library due to massive fundamental changes in how the library operates." -msgstr "v0.10.0は、ライブラリの根本的動作が大幅に変更された、ライブラリの中でも大きな更新の一つです。" - -#: ../../migrating_to_async.rst:13 -msgid "The biggest major change is that the library has dropped support to all versions prior to Python 3.4.2. This was made to support :mod:`asyncio`, in which more detail can be seen :issue:`in the corresponding issue <50>`. To reiterate this, the implication is that **python version 2.7 and 3.3 are no longer supported**." -msgstr "最大の大きな変更点はPython 3.4.2以前のすべてのバージョンのサポートが打ち切られたことです。これは :mod:`asyncio` をサポートするためで、対応する :issue:`in the corresponding issue <50>` で詳細が見られます。繰り返しになりますが、 **Python 2.7及びPython3.3は、既にサポートされていません** 。" - -#: ../../migrating_to_async.rst:18 -msgid "Below are all the other major changes from v0.9.0 to v0.10.0." -msgstr "以下は、v0.9.0からv0.10.0までのその他の主要な変更点です。" - -#: ../../migrating_to_async.rst:21 -msgid "Event Registration" -msgstr "イベント登録" - -#: ../../migrating_to_async.rst:23 -msgid "All events before were registered using :meth:`Client.event`. While this is still possible, the events must be decorated with ``@asyncio.coroutine``." -msgstr "以前まではすべてのイベントが :meth:`Client.event` を使用して登録されていました。このやり方はまだ可能ですが、 ``@asyncio.coroutine`` で修飾が必要です。" - -#: ../../migrating_to_async.rst:26 -#: ../../migrating_to_async.rst:71 -#: ../../migrating_to_async.rst:105 -#: ../../migrating_to_async.rst:166 -msgid "Before:" -msgstr "更新前:" - -#: ../../migrating_to_async.rst:34 -#: ../../migrating_to_async.rst:83 -#: ../../migrating_to_async.rst:111 -#: ../../migrating_to_async.rst:174 -#: ../../migrating_to_async.rst:284 -msgid "After:" -msgstr "更新後:" - -#: ../../migrating_to_async.rst:43 -msgid "Or in Python 3.5+:" -msgstr "Python 3.5以降の場合:" - -#: ../../migrating_to_async.rst:51 -msgid "Because there is a lot of typing, a utility decorator (:meth:`Client.async_event`) is provided for easier registration. For example:" -msgstr "多くの型付けがあるため、登録を簡単にするためにユーティリティデコレータ (:meth:`Client.async_event`) が用意されています。例:" - -#: ../../migrating_to_async.rst:61 -msgid "Be aware however, that this is still a coroutine and your other functions that are coroutines must be decorated with ``@asyncio.coroutine`` or be ``async def``." -msgstr "しかし、これはまだコルーチンであり、コルーチンである関数には ``@asyncio.coroutine`` あるいは ``async def`` での修飾が必要であることに注意してください。" - -#: ../../migrating_to_async.rst:65 -msgid "Event Changes" -msgstr "イベントの変更" - -#: ../../migrating_to_async.rst:67 -msgid "Some events in v0.9.0 were considered pretty useless due to having no separate states. The main events that were changed were the ``_update`` events since previously they had no context on what was changed." -msgstr "v0.9.0でいくつかのイベントは、別の状態を持たないために、役に立たないと考えられていました。変更された主なイベントは、更新前と更新後の二つの状態を持つ ``_update`` イベントです。" - -#: ../../migrating_to_async.rst:93 -msgid "Note that ``on_status`` was removed. If you want its functionality, use :func:`on_member_update`. See :ref:`discord-api-events` for more information. Other removed events include ``on_socket_closed``, ``on_socket_receive``, and ``on_socket_opened``." -msgstr "``on_status`` が削除されていることに注意してください。似たような機能が使いたい場合は、 :func:`on_member_update` を使用します。詳細は :ref:`discord-api-events` を参照してください。他に、 ``on_socket_closed`` 、 ``on_socket_receive`` や ``on_socket_opened`` も削除されています。" - -#: ../../migrating_to_async.rst:98 -msgid "Coroutines" -msgstr "コルーチン" - -#: ../../migrating_to_async.rst:100 -msgid "The biggest change that the library went through is that almost every function in :class:`Client` was changed to be a `coroutine `_. Functions that are marked as a coroutine in the documentation must be awaited from or yielded from in order for the computation to be done. For example..." -msgstr "ライブラリの最大の変更点は :class:`Client` を使用していたほとんどの関数が `コルーチン `_ へと変更されたことです。ドキュメントのコルーチンとして定義された関数は、処理の終了を待機します。例えば、" - -#: ../../migrating_to_async.rst:120 -msgid "In order for you to ``yield from`` or ``await`` a coroutine then your function must be decorated with ``@asyncio.coroutine`` or ``async def``." -msgstr "``yield from`` あるいは ``await`` を使用するには、関数が ``@asyncio.coroutine`` または ``async def`` で修飾されている必要があります。" - -#: ../../migrating_to_async.rst:124 -msgid "Iterables" -msgstr "イテラブル" - -#: ../../migrating_to_async.rst:126 -msgid "For performance reasons, many of the internal data structures were changed into a dictionary to support faster lookup. As a consequence, this meant that some lists that were exposed via the API have changed into iterables and not sequences. In short, this means that certain attributes now only support iteration and not any of the sequence functions." -msgstr "パフォーマンス上の理由から、より高速な情報の取得を可能とするため、多くの内部データ構造が辞書に変更されました。結果として、これはAPIを介して公開された一部リストが、シーケンスではなくイテラブルに変更されたことを意味します。つまるところ、現在、特定の属性はイテラブルのみをサポートしており、シーケンスを扱うことができないことを意味しています。" - -#: ../../migrating_to_async.rst:131 -msgid "The affected attributes are as follows:" -msgstr "影響を受ける属性は以下のとおりです。" - -#: ../../migrating_to_async.rst:133 -msgid ":attr:`Client.servers`" -msgstr ":attr:`Client.servers`" - -#: ../../migrating_to_async.rst:134 -msgid ":attr:`Client.private_channels`" -msgstr ":attr:`Client.private_channels`" - -#: ../../migrating_to_async.rst:135 -msgid ":attr:`Server.channels`" -msgstr ":attr:`Server.channels`" - -#: ../../migrating_to_async.rst:136 -msgid ":attr:`Server.members`" -msgstr ":attr:`Server.members`" - -#: ../../migrating_to_async.rst:138 -msgid "Some examples of previously valid behaviour that is now invalid" -msgstr "以前は有効であったが、現在は無効である操作の例。" - -#: ../../migrating_to_async.rst:145 -msgid "Since they are no longer :obj:`list`\\s, they no longer support indexing or any operation other than iterating. In order to get the old behaviour you should explicitly cast it to a list." -msgstr "これらは、既に :obj:`list` ではないため、インデックスや反復処理以外の操作はサポートされなくなりました。以前の動作で処理を行うには、listに明示的にキャストする必要があります。" - -#: ../../migrating_to_async.rst:155 -msgid "Due to internal changes of the structure, the order you receive the data in is not in a guaranteed order." -msgstr "構造の内部的な変更のため、データを受け取った順序は保証されません。" - -#: ../../migrating_to_async.rst:159 -msgid "Enumerations" -msgstr "列挙型" - -#: ../../migrating_to_async.rst:161 -msgid "Due to dropping support for versions lower than Python 3.4.2, the library can now use :doc:`py:library/enum` in places where it makes sense." -msgstr "Python 3.4.2以前のバージョンのサポートを打ち切ったため、ライブラリは理にかなった場所での :doc:`py:library/enum` の使用が可能になりました。" - -#: ../../migrating_to_async.rst:164 -msgid "The common places where this was changed was in the server region, member status, and channel type." -msgstr "変更された主な場所は、サーバーリージョン、メンバーのステータス、およびチャンネルタイプです。" - -#: ../../migrating_to_async.rst:182 -msgid "The main reason for this change was to reduce the use of finicky strings in the API as this could give users a false sense of power. More information can be found in the :ref:`discord-api-enums` page." -msgstr "この変更の主な理由は、APIでの厄介な文字列の使用を削減することでした。ユーザーに誤った感覚を与える可能性があったためです。詳細は :ref:`discord-api-enums` を参照してください。" - -#: ../../migrating_to_async.rst:186 -msgid "Properties" -msgstr "プロパティ" - -#: ../../migrating_to_async.rst:188 -msgid "A lot of function calls that returned constant values were changed into Python properties for ease of use in format strings." -msgstr "定数値を返す関数呼び出しの多くは、書式化した文字列での使いやすさ向上を図るため、Pythonのプロパティに変更されました。" - -#: ../../migrating_to_async.rst:191 -msgid "The following functions were changed into properties:" -msgstr "以下はプロパティに変更された関数です。" - -#: ../../migrating_to_async.rst:194 -#: ../../migrating_to_async.rst:223 -#: ../../migrating_to_async.rst:238 -msgid "Before" -msgstr "変更前" - -#: ../../migrating_to_async.rst:194 -#: ../../migrating_to_async.rst:223 -#: ../../migrating_to_async.rst:238 -msgid "After" -msgstr "変更後" - -#: ../../migrating_to_async.rst:196 -msgid "``User.avatar_url()``" -msgstr "``User.avatar_url()``" - -#: ../../migrating_to_async.rst:196 -msgid ":attr:`User.avatar_url`" -msgstr ":attr:`User.avatar_url`" - -#: ../../migrating_to_async.rst:198 -msgid "``User.mention()``" -msgstr "``User.mention()``" - -#: ../../migrating_to_async.rst:198 -msgid ":attr:`User.mention`" -msgstr ":attr:`User.mention`" - -#: ../../migrating_to_async.rst:200 -msgid "``Channel.mention()``" -msgstr "``Channel.mention()``" - -#: ../../migrating_to_async.rst:200 -msgid ":attr:`Channel.mention`" -msgstr ":attr:`Channel.mention`" - -#: ../../migrating_to_async.rst:202 -msgid "``Channel.is_default_channel()``" -msgstr "``Channel.is_default_channel()``" - -#: ../../migrating_to_async.rst:202 -msgid ":attr:`Channel.is_default`" -msgstr ":attr:`Channel.is_default`" - -#: ../../migrating_to_async.rst:204 -msgid "``Role.is_everyone()``" -msgstr "``Role.is_everyone()``" - -#: ../../migrating_to_async.rst:204 -msgid ":attr:`Role.is_everyone`" -msgstr ":attr:`Role.is_everyone`" - -#: ../../migrating_to_async.rst:206 -msgid "``Server.get_default_role()``" -msgstr "``Server.get_default_role()``" - -#: ../../migrating_to_async.rst:206 -msgid ":attr:`Server.default_role`" -msgstr ":attr:`Server.default_role`" - -#: ../../migrating_to_async.rst:208 -msgid "``Server.icon_url()``" -msgstr "``Server.icon_url()``" - -#: ../../migrating_to_async.rst:208 -msgid ":attr:`Server.icon_url`" -msgstr ":attr:`Server.icon_url`" - -#: ../../migrating_to_async.rst:210 -msgid "``Server.get_default_channel()``" -msgstr "``Server.get_default_channel()``" - -#: ../../migrating_to_async.rst:210 -msgid ":attr:`Server.default_channel`" -msgstr ":attr:`Server.default_channel`" - -#: ../../migrating_to_async.rst:212 -msgid "``Message.get_raw_mentions()``" -msgstr "``Message.get_raw_mentions()``" - -#: ../../migrating_to_async.rst:212 -msgid ":attr:`Message.raw_mentions`" -msgstr ":attr:`Message.raw_mentions`" - -#: ../../migrating_to_async.rst:214 -msgid "``Message.get_raw_channel_mentions()``" -msgstr "``Message.get_raw_channel_mentions()``" - -#: ../../migrating_to_async.rst:214 -msgid ":attr:`Message.raw_channel_mentions`" -msgstr ":attr:`Message.raw_channel_mentions`" - -#: ../../migrating_to_async.rst:218 -msgid "Member Management" -msgstr "メンバー管理" - -#: ../../migrating_to_async.rst:220 -msgid "Functions that involved banning and kicking were changed." -msgstr "BANやキックを含む関数が追加されました。" - -#: ../../migrating_to_async.rst:225 -msgid "``Client.ban(server, user)``" -msgstr "``Client.ban(server, user)``" - -#: ../../migrating_to_async.rst:225 -msgid "``Client.ban(member)``" -msgstr "``Client.ban(member)``" - -#: ../../migrating_to_async.rst:227 -msgid "``Client.kick(server, user)``" -msgstr "``Client.kick(server, user)``" - -#: ../../migrating_to_async.rst:227 -msgid "``Client.kick(member)``" -msgstr "``Client.kick(member)``" - -#: ../../migrating_to_async.rst:233 -msgid "Renamed Functions" -msgstr "関数の改名" - -#: ../../migrating_to_async.rst:235 -msgid "Functions have been renamed." -msgstr "いくつかの関数名が変更されました。" - -#: ../../migrating_to_async.rst:240 -msgid "``Client.set_channel_permissions``" -msgstr "``Client.set_channel_permissions``" - -#: ../../migrating_to_async.rst:240 -#: ../../migrating_to_async.rst:263 -msgid ":meth:`Client.edit_channel_permissions`" -msgstr ":meth:`Client.edit_channel_permissions`" - -#: ../../migrating_to_async.rst:243 -msgid "All the :class:`Permissions` related attributes have been renamed and the `can_` prefix has been dropped. So for example, ``can_manage_messages`` has become ``manage_messages``." -msgstr "すべての :class:`Permissions` 関連の属性の名称が変更され、 接頭詞であった `can_` が削除されました。例を挙げると ``can_manage_messages`` が ``manage_messages`` になりました。" - -#: ../../migrating_to_async.rst:247 -msgid "Forced Keyword Arguments" -msgstr "強制キーワード引数" - -#: ../../migrating_to_async.rst:249 -msgid "Since 3.0+ of Python, we can now force questions to take in forced keyword arguments. A keyword argument is when you explicitly specify the name of the variable and assign to it, for example: ``foo(name='test')``. Due to this support, some functions in the library were changed to force things to take said keyword arguments. This is to reduce errors of knowing the argument order and the issues that could arise from them." -msgstr "Python 3.0以降では、強制的にキーワード引数をとるようにすることができるようになりました。キーワード引数は、変数の名前を明示的に指定してそれに割り当てることで、例えば ``foo(name='test')`` などです。このサポートにより、ライブラリ内のいくつかの関数が変更され、キーワード引数を取るようになりました。これは引数の順序が誤っていることが原因で発生するエラーを減らすためです。" - -#: ../../migrating_to_async.rst:254 -msgid "The following parameters are now exclusively keyword arguments:" -msgstr "次のパラメータは、現在、排他的なキーワード引数です。" - -#: ../../migrating_to_async.rst:256 -msgid ":meth:`Client.send_message`" -msgstr ":meth:`Client.send_message`" - -#: ../../migrating_to_async.rst:257 -msgid "``tts``" -msgstr "``tts``" - -#: ../../migrating_to_async.rst:259 -msgid ":meth:`Client.logs_from`" -msgstr ":meth:`Client.logs_from`" - -#: ../../migrating_to_async.rst:259 -msgid "``before``" -msgstr "``before``" - -#: ../../migrating_to_async.rst:260 -msgid "``after``" -msgstr "``after``" - -#: ../../migrating_to_async.rst:262 -msgid "``allow``" -msgstr "``allow``" - -#: ../../migrating_to_async.rst:263 -msgid "``deny``" -msgstr "``deny``" - -#: ../../migrating_to_async.rst:265 -msgid "In the documentation you can tell if a function parameter is a forced keyword argument if it is after ``\\*,`` in the function signature." -msgstr "ドキュメントでは、関数シグネチャ内の ``\\*,`` の後に引数があるかどうかで、関数の引数が強制的なキーワード引数であるかを知ることができます。" - -#: ../../migrating_to_async.rst:271 -msgid "Running the Client" -msgstr "クライアントの実行" - -#: ../../migrating_to_async.rst:273 -msgid "In earlier versions of discord.py, ``client.run()`` was a blocking call to the main thread that called it. In v0.10.0 it is still a blocking call but it handles the event loop for you. However, in order to do that you must pass in your credentials to :meth:`Client.run`." -msgstr "以前のバージョンのdiscord.pyでは ``client.run()`` は呼び出したメインスレッドをブロッキングするブロック付き呼び出しでした。v0.10.0でも未だブロック付き呼び出しですが、イベントループで処理を行います。ただし、それを行うためには認証情報を :meth:`Client.run` に渡す必要があります。" - -#: ../../migrating_to_async.rst:277 -msgid "Basically, before:" -msgstr "以前:" - -#: ../../migrating_to_async.rst:292 -msgid "Like in the older ``Client.run`` function, the newer one must be the one of the last functions to call. This is because the function is **blocking**. Registering events or doing anything after :meth:`Client.run` will not execute until the function returns." -msgstr "以前の ``Client.run`` 同様、新しくなった関数も最後に呼び出す必要があります。これは関数がブロッキングを行うためです。 :meth:`Client.run` の後に何かを定義しても、この関数が終了するまで、それらの処理は行われません。" - -#: ../../migrating_to_async.rst:297 -msgid "This is a utility function that abstracts the event loop for you. There's no need for the run call to be blocking and out of your control. Indeed, if you want control of the event loop then doing so is quite straightforward:" -msgstr "これはイベントループを抽象化するユーティリティ関数です。 実行呼び出しがブロックされ、コントロールから外れる必要はありません。実際に、イベントループを制御したい場合、この方法では非常に簡単です。" - diff --git a/docs/locale/ja/LC_MESSAGES/quickstart.po b/docs/locale/ja/LC_MESSAGES/quickstart.po deleted file mode 100644 index e6b93758..00000000 --- a/docs/locale/ja/LC_MESSAGES/quickstart.po +++ /dev/null @@ -1,91 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: quickstart.pot\n" -"X-Crowdin-File-ID: 50\n" -"Language: ja_JP\n" - -#: ../../quickstart.rst:6 -msgid "Quickstart" -msgstr "クイックスタート" - -#: ../../quickstart.rst:8 -msgid "This page gives a brief introduction to the library. It assumes you have the library installed, if you don't check the :ref:`installing` portion." -msgstr "ここでは、ライブラリの概要を説明します。ライブラリがインストールされていることを前提としているので、インストールを終えていない人は :ref:`installing` を参照してください。" - -#: ../../quickstart.rst:12 -msgid "A Minimal Bot" -msgstr "最小限のBot" - -#: ../../quickstart.rst:14 -msgid "Let's make a bot that replies to a specific message and walk you through it." -msgstr "では早速、特定のメッセージに対して、返事をするBotを作ってみましょう。" - -#: ../../quickstart.rst:16 -msgid "It looks something like this:" -msgstr "結論から書くと、このように書くことができます。" - -#: ../../quickstart.rst:38 -msgid "Let's name this file ``example_bot.py``. Make sure not to name it ``discord.py`` as that'll conflict with the library." -msgstr "ファイルの名前を ``example_bot.py`` としましょう。ライブラリと競合してしまうので、 ``discord.py`` というファイル名にはしないでください。" - -#: ../../quickstart.rst:41 -msgid "There's a lot going on here, so let's walk you through it step by step." -msgstr "さて、では順を追って一つづつ説明していきます。" - -#: ../../quickstart.rst:43 -msgid "The first line just imports the library, if this raises a `ModuleNotFoundError` or `ImportError` then head on over to :ref:`installing` section to properly install." -msgstr "最初の行は、ただライブラリをインポートしただけです。 `ModuleNotFoundError` や `ImportError` が発生した場合は :ref:`installing` を見て、ライブラリをきちんとインストールしましょう。" - -#: ../../quickstart.rst:45 -msgid "Next, we create an instance of a :class:`Client`. This client is our connection to Discord." -msgstr "次に、 :class:`Client` のインスタンスを作成します。クライアントはDiscordへの接続を行います。" - -#: ../../quickstart.rst:46 -msgid "We then use the :meth:`Client.event` decorator to register an event. This library has many events. Since this library is asynchronous, we do things in a \"callback\" style manner." -msgstr "続いて、 :meth:`Client.event` デコレータを使用してイベントを登録します。ライブラリにはたくさんのイベントが用意されています。このライブラリは非同期のため、「コールバック」のスタイルで処理を行います。" - -#: ../../quickstart.rst:49 -msgid "A callback is essentially a function that is called when something happens. In our case, the :func:`on_ready` event is called when the bot has finished logging in and setting things up and the :func:`on_message` event is called when the bot has received a message." -msgstr "コールバックは基本的に、何かが発生した場合に呼び出される関数です。今回の場合だと、Botがログインして、設定などを終えたときに :func:`on_ready` が、メッセージを受信したときに :func:`on_message` が呼び出されます。" - -#: ../../quickstart.rst:52 -msgid "Since the :func:`on_message` event triggers for *every* message received, we have to make sure that we ignore messages from ourselves. We do this by checking if the :attr:`Message.author` is the same as the :attr:`Client.user`." -msgstr ":func:`on_message` イベントは受信したメッセージすべてに対して呼び出されるため、Bot自身からのメッセージは無視するように設定する必要があります。これは、メッセージの送信者である :attr:`Message.author` と、Bot自身を表す :attr:`Client.user` が等しいか比較することで実装できます。" - -#: ../../quickstart.rst:55 -msgid "Afterwards, we check if the :class:`Message.content` starts with ``'$hello'``. If it is, then we reply in the channel it was used in with ``'Hello!'``." -msgstr "その後、 :class:`Message.content` が ``'$hello'`` から始まるかどうかを確認し、当てはまればそのチャンネルに ``'Hello!'`` という返事を送信します。" - -#: ../../quickstart.rst:57 -msgid "Finally, we run the bot with our login token. If you need help getting your token or creating a bot, look in the :ref:`discord-intro` section." -msgstr "最後に、ログイン用トークンを用いてBotを起動します。トークンの取得やBotの作成について分からないことがあれば、 :ref:`discord-intro` を参照してください。" - -#: ../../quickstart.rst:61 -msgid "Now that we've made a bot, we have to *run* the bot. Luckily, this is simple since this is just a Python script, we can run it directly." -msgstr "さて、これでBotは完成なので、Botを *実行* してみましょう。幸いにも、これはただのPythonスクリプトなので実行は簡単です。直接実行が可能です。" - -#: ../../quickstart.rst:64 -msgid "On Windows:" -msgstr "Windowsの場合:" - -#: ../../quickstart.rst:70 -msgid "On other systems:" -msgstr "その他のシステムの場合:" - -#: ../../quickstart.rst:76 -msgid "Now you can try playing around with your basic bot." -msgstr "これで、あなたが作ったBotと遊ぶことができます。" - diff --git a/docs/locale/ja/LC_MESSAGES/sphinx.po b/docs/locale/ja/LC_MESSAGES/sphinx.po deleted file mode 100644 index cdf43dd4..00000000 --- a/docs/locale/ja/LC_MESSAGES/sphinx.po +++ /dev/null @@ -1,23 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: sphinx.pot\n" -"X-Crowdin-File-ID: 70\n" -"Language: ja_JP\n" - -#: ../../_templates/layout.html:24 -msgid "Created using Sphinx %(sphinx_version)s." -msgstr "Sphinx %(sphinx_version)s で作成されました。" - diff --git a/docs/locale/ja/LC_MESSAGES/version_guarantees.po b/docs/locale/ja/LC_MESSAGES/version_guarantees.po deleted file mode 100644 index d66cd38b..00000000 --- a/docs/locale/ja/LC_MESSAGES/version_guarantees.po +++ /dev/null @@ -1,79 +0,0 @@ -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2019-06-22 09:35-0400\n" -"PO-Revision-Date: 2020-10-24 02:41\n" -"Last-Translator: \n" -"Language-Team: Japanese\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Crowdin-Project: discordpy\n" -"X-Crowdin-Project-ID: 362783\n" -"X-Crowdin-Language: ja\n" -"X-Crowdin-File: version_guarantees.pot\n" -"X-Crowdin-File-ID: 46\n" -"Language: ja_JP\n" - -#: ../../version_guarantees.rst:4 -msgid "Version Guarantees" -msgstr "バージョン保証" - -#: ../../version_guarantees.rst:6 -msgid "The library follows a `semantic versioning principle `_ which means that the major version is updated every time there is an incompatible API change. However due to the lack of guarantees on the Discord side when it comes to breaking changes along with the fairly dynamic nature of Python it can be hard to discern what can be considered a breaking change and what isn't." -msgstr "このライブラリは `セマンティック バージョニングの原則 `_ に従います。それが意味するのは、互換性のないAPIの変更が行われるたびにメジャーバージョンが更新されるということです。しかしながら、Discord側にはPythonの非常に動的な性質とともに破壊的変更を行う際の保証がないため、破壊的変更とみなされるもの、そうでないものを区別するのは困難です。" - -#: ../../version_guarantees.rst:8 -msgid "The first thing to keep in mind is that breaking changes only apply to **publicly documented functions and classes**. If it's not listed in the documentation here then it is not part of the public API and is thus bound to change. This includes attributes that start with an underscore or functions without an underscore that are not documented." -msgstr "最初に覚えておくべきことは、破壊的変更は **公開ドキュメント化してある関数とクラス** のみに適用されるということです。ドキュメントにないものはパブリックAPIの一部ではないため、変更される可能性があります。これにはドキュメントに載っていないアンダースコアから始まる関数や、通常の関数が含まれます。" - -#: ../../version_guarantees.rst:12 -msgid "The examples below are non-exhaustive." -msgstr "以下の例は網羅的なものではありません。" - -#: ../../version_guarantees.rst:15 -msgid "Examples of Breaking Changes" -msgstr "破壊的変更の例" - -#: ../../version_guarantees.rst:17 -msgid "Changing the default parameter value to something else." -msgstr "デフォルトのパラメータ値を別のものに変更。" - -#: ../../version_guarantees.rst:18 -msgid "Renaming a function without an alias to an old function." -msgstr "古い関数へのエイリアスのない関数の名称を変更。" - -#: ../../version_guarantees.rst:19 -msgid "Adding or removing parameters to an event." -msgstr "イベントへのパラメータの追加、あるいは削除。" - -#: ../../version_guarantees.rst:22 -msgid "Examples of Non-Breaking Changes" -msgstr "破壊的変更ではないものの例" - -#: ../../version_guarantees.rst:24 -msgid "Adding or removing private underscored attributes." -msgstr "アンダースコア付きのプライベート関数の追加、あるいは削除。" - -#: ../../version_guarantees.rst:25 -msgid "Adding an element into the ``__slots__`` of a data class." -msgstr "データクラスの ``__slots__`` への要素の追加。" - -#: ../../version_guarantees.rst:26 -msgid "Changing the behaviour of a function to fix a bug." -msgstr "バグ修正のための関数の動作の変更。" - -#: ../../version_guarantees.rst:27 -msgid "Changes in the documentation." -msgstr "ドキュメントの変更。" - -#: ../../version_guarantees.rst:28 -msgid "Modifying the internal HTTP handling." -msgstr "内部HTTP処理の変更。" - -#: ../../version_guarantees.rst:29 -msgid "Upgrading the dependencies to a new version, major or otherwise." -msgstr "依存関係をメジャー、またはそれ以外の新しいバージョンへアップグレード。" - diff --git a/docs/locale/ja/LC_MESSAGES/whats_new.po b/docs/locale/ja/LC_MESSAGES/whats_new.po deleted file mode 100644 index ebcc0cd4..00000000 --- a/docs/locale/ja/LC_MESSAGES/whats_new.po +++ /dev/null @@ -1,2937 +0,0 @@ - -msgid "" -msgstr "" -"Project-Id-Version: discordpy\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-23 22:41-0400\n" -"PO-Revision-Date: 2020-10-24 02:41+0000\n" -"Last-Translator: \n" -"Language: ja_JP\n" -"Language-Team: Japanese\n" -"Plural-Forms: nplurals=1; plural=0\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.5.3\n" - -#: ../../whats_new.rst:9 -msgid "Changelog" -msgstr "変更履歴" - -#: ../../whats_new.rst:11 -msgid "" -"This page keeps a detailed human friendly rendering of what's new and " -"changed in specific versions." -msgstr "このページでは、特定のバージョンの新機能や変更された機能を人にやさしい形で詳細に記載しています。" - -#: ../../whats_new.rst:17 -#, fuzzy -msgid "v1.5.1" -msgstr "v1.2.1" - -#: ../../whats_new.rst:20 ../../whats_new.rst:73 ../../whats_new.rst:107 -#: ../../whats_new.rst:133 ../../whats_new.rst:204 ../../whats_new.rst:255 -#: ../../whats_new.rst:265 ../../whats_new.rst:280 ../../whats_new.rst:298 -#: ../../whats_new.rst:383 ../../whats_new.rst:434 ../../whats_new.rst:444 -#: ../../whats_new.rst:459 ../../whats_new.rst:473 ../../whats_new.rst:483 -#: ../../whats_new.rst:519 ../../whats_new.rst:549 ../../whats_new.rst:591 -#: ../../whats_new.rst:631 ../../whats_new.rst:652 ../../whats_new.rst:668 -#: ../../whats_new.rst:688 ../../whats_new.rst:736 ../../whats_new.rst:753 -#: ../../whats_new.rst:790 ../../whats_new.rst:826 ../../whats_new.rst:878 -#: ../../whats_new.rst:922 ../../whats_new.rst:988 -msgid "Bug Fixes" -msgstr "バグ修正" - -#: ../../whats_new.rst:22 -msgid "" -"Fix :func:`utils.escape_markdown` not escaping quotes properly " -"(:issue:`5897`)" -msgstr "" - -#: ../../whats_new.rst:23 -msgid "Fix :class:`Message` not being hashable (:issue:`5901`, :issue:`5866`)" -msgstr "" - -#: ../../whats_new.rst:24 -msgid "Fix moving channels to the end of the channel list (:issue:`5923`)" -msgstr "" - -#: ../../whats_new.rst:25 -msgid "" -"Fix seemingly strange behaviour in ``__eq__`` for " -":class:`PermissionOverwrite` (:issue:`5929`)" -msgstr "" - -#: ../../whats_new.rst:26 -msgid "" -"Fix aliases showing up in ``__iter__`` for :class:`Intents` " -"(:issue:`5945`)" -msgstr "" - -#: ../../whats_new.rst:27 -msgid "" -"Fix the bot disconnecting from voice when moving them to another channel " -"(:issue:`5904`)" -msgstr "" - -#: ../../whats_new.rst:28 -msgid "" -"Fix attribute errors when chunking times out sometimes during delayed " -"on_ready dispatching." -msgstr "" - -#: ../../whats_new.rst:29 -msgid "" -"Ensure that the bot's own member is not evicted from the cache " -"(:issue:`5949`)" -msgstr "" - -#: ../../whats_new.rst:32 ../../whats_new.rst:88 ../../whats_new.rst:122 -#: ../../whats_new.rst:232 ../../whats_new.rst:304 ../../whats_new.rst:407 -#: ../../whats_new.rst:527 ../../whats_new.rst:554 ../../whats_new.rst:612 -msgid "Miscellaneous" -msgstr "" - -#: ../../whats_new.rst:34 -msgid "" -"Members are now loaded during ``GUILD_MEMBER_UPDATE`` events if " -":attr:`MemberCacheFlags.joined` is set. (:issue:`5930`)" -msgstr "" - -#: ../../whats_new.rst:35 -msgid "" -"|commands| :class:`MemberConverter ` now " -"properly lazily fetches members if not available from cache." -msgstr "" - -#: ../../whats_new.rst:36 -msgid "This is the same as having ``discord.Member`` as the type-hint." -msgstr "" - -#: ../../whats_new.rst:37 -msgid "" -":meth:`Guild.chunk` now allows concurrent calls without spamming the " -"gateway with requests." -msgstr "" - -#: ../../whats_new.rst:42 -#, fuzzy -msgid "v1.5.0" -msgstr "v1.2.0" - -#: ../../whats_new.rst:44 -msgid "" -"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`." -msgstr "" - -#: ../../whats_new.rst:47 -#, fuzzy -msgid "API Changes" -msgstr "破壊的変更" - -#: ../../whats_new.rst:49 -msgid "" -"Members and presences will no longer be retrieved due to an API change. " -"See :ref:`privileged_intents` for more info." -msgstr "" - -#: ../../whats_new.rst:50 -msgid "" -"As a consequence, fetching offline members is disabled if the members " -"intent is not enabled." -msgstr "" - -#: ../../whats_new.rst:53 ../../whats_new.rst:147 ../../whats_new.rst:317 -#: ../../whats_new.rst:496 ../../whats_new.rst:564 ../../whats_new.rst:682 -#: ../../whats_new.rst:714 ../../whats_new.rst:747 ../../whats_new.rst:776 -#: ../../whats_new.rst:803 ../../whats_new.rst:839 ../../whats_new.rst:899 -#: ../../whats_new.rst:945 -msgid "New Features" -msgstr "新機能" - -#: ../../whats_new.rst:55 -msgid "" -"Support for gateway intents, passed via ``intents`` in :class:`Client` " -"using :class:`Intents`." -msgstr "" - -#: ../../whats_new.rst:56 -msgid "Add :attr:`VoiceRegion.south_korea` (:issue:`5233`)" -msgstr "" - -#: ../../whats_new.rst:57 -msgid "Add support for ``__eq__`` for :class:`Message` (:issue:`5789`)" -msgstr "" - -#: ../../whats_new.rst:58 -msgid "Add :meth:`Colour.dark_theme` factory method (:issue:`1584`)" -msgstr "" - -#: ../../whats_new.rst:59 -msgid "" -"Add :meth:`AllowedMentions.none` and :meth:`AllowedMentions.all` " -"(:issue:`5785`)" -msgstr "" - -#: ../../whats_new.rst:60 -msgid "" -"Add more concrete exceptions for 500 class errors under " -":class:`DiscordServerError` (:issue:`5797`)" -msgstr "" - -#: ../../whats_new.rst:61 -msgid "Implement :class:`VoiceProtocol` to better intersect the voice flow." -msgstr "" - -#: ../../whats_new.rst:62 -msgid "Add :meth:`Guild.chunk` to fully chunk a guild." -msgstr "" - -#: ../../whats_new.rst:63 -msgid "" -"Add :class:`MemberCacheFlags` to better control member cache. See " -":ref:`intents_member_cache` for more info." -msgstr "" - -#: ../../whats_new.rst:65 -msgid "Add support for :attr:`ActivityType.competing` (:issue:`5823`)" -msgstr "" - -#: ../../whats_new.rst:65 -msgid "This seems currently unused API wise." -msgstr "" - -#: ../../whats_new.rst:67 -msgid "" -"Add support for message references, :attr:`Message.reference` " -"(:issue:`5754`, :issue:`5832`)" -msgstr "" - -#: ../../whats_new.rst:68 -msgid "" -"Add alias for :class:`ColourConverter` under ``ColorConverter`` " -"(:issue:`5773`)" -msgstr "" - -#: ../../whats_new.rst:69 -msgid "" -"Add alias for :attr:`PublicUserFlags.verified_bot_developer` under " -":attr:`PublicUserFlags.early_verified_bot_developer` (:issue:`5849`)" -msgstr "" - -#: ../../whats_new.rst:70 -msgid "" -"|commands| Add support for ``require_var_positional`` for " -":class:`Command` (:issue:`5793`)" -msgstr "" - -#: ../../whats_new.rst:75 ../../whats_new.rst:109 -msgid "Fix issue with :meth:`Guild.by_category` not showing certain channels." -msgstr "" - -#: ../../whats_new.rst:76 ../../whats_new.rst:110 -msgid "" -"Fix :attr:`abc.GuildChannel.permissions_synced` always being ``False`` " -"(:issue:`5772`)" -msgstr "" - -#: ../../whats_new.rst:77 ../../whats_new.rst:111 -msgid "" -"Fix handling of cloudflare bans on webhook related requests " -"(:issue:`5221`)" -msgstr "" - -#: ../../whats_new.rst:78 ../../whats_new.rst:112 -msgid "" -"Fix cases where a keep-alive thread would ack despite already dying " -"(:issue:`5800`)" -msgstr "" - -#: ../../whats_new.rst:79 ../../whats_new.rst:113 -msgid "" -"Fix cases where a :class:`Member` reference would be stale when cache is " -"disabled in message events (:issue:`5819`)" -msgstr "" - -#: ../../whats_new.rst:80 ../../whats_new.rst:114 -msgid "" -"Fix ``allowed_mentions`` not being sent when sending a single file " -"(:issue:`5835`)" -msgstr "" - -#: ../../whats_new.rst:81 ../../whats_new.rst:115 -msgid "" -"Fix ``overwrites`` being ignored in :meth:`abc.GuildChannel.edit` if " -"``{}`` is passed (:issue:`5756`, :issue:`5757`)" -msgstr "" - -#: ../../whats_new.rst:82 ../../whats_new.rst:116 -msgid "" -"|commands| Fix exceptions being raised improperly in command invoke hooks" -" (:issue:`5799`)" -msgstr "" - -#: ../../whats_new.rst:83 ../../whats_new.rst:117 -msgid "" -"|commands| Fix commands not being properly ejected during errors in a cog" -" injection (:issue:`5804`)" -msgstr "" - -#: ../../whats_new.rst:84 ../../whats_new.rst:118 -msgid "|commands| Fix cooldown timing ignoring edited timestamps." -msgstr "" - -#: ../../whats_new.rst:85 ../../whats_new.rst:119 -msgid "" -"|tasks| Fix tasks extending the next iteration on handled exceptions " -"(:issue:`5762`, :issue:`5763`)" -msgstr "" - -#: ../../whats_new.rst:90 -msgid "Webhook requests are now logged (:issue:`5798`)" -msgstr "" - -#: ../../whats_new.rst:91 ../../whats_new.rst:124 -msgid "" -"Remove caching layer from :attr:`AutoShardedClient.shards`. This was " -"causing issues if queried before launching shards." -msgstr "" - -#: ../../whats_new.rst:92 -msgid "Gateway rate limits are now handled." -msgstr "" - -#: ../../whats_new.rst:93 -msgid "Warnings logged due to missed caches are now changed to DEBUG log level." -msgstr "" - -#: ../../whats_new.rst:94 -msgid "Some strings are now explicitly interned to reduce memory usage." -msgstr "" - -#: ../../whats_new.rst:95 -msgid "" -"Usage of namedtuples has been reduced to avoid potential breaking changes" -" in the future (:issue:`5834`)" -msgstr "" - -#: ../../whats_new.rst:96 -msgid "" -"|commands| All :class:`BadArgument` exceptions from the built-in " -"converters now raise concrete exceptions to better tell them apart " -"(:issue:`5748`)" -msgstr "" - -#: ../../whats_new.rst:97 ../../whats_new.rst:125 -msgid "" -"|tasks| Lazily fetch the event loop to prevent surprises when changing " -"event loop policy (:issue:`5808`)" -msgstr "" - -#: ../../whats_new.rst:102 -#, fuzzy -msgid "v1.4.2" -msgstr "v1.2.2" - -#: ../../whats_new.rst:104 -msgid "This is a maintenance release with backports from :ref:`vp1p5p0`." -msgstr "" - -#: ../../whats_new.rst:130 -#, fuzzy -msgid "v1.4.1" -msgstr "v1.2.1" - -#: ../../whats_new.rst:135 -msgid "" -"Properly terminate the connection when :meth:`Client.close` is called " -"(:issue:`5207`)" -msgstr "" - -#: ../../whats_new.rst:136 -msgid "" -"Fix error being raised when clearing embed author or image when it was " -"already cleared (:issue:`5210`, :issue:`5212`)" -msgstr "" - -#: ../../whats_new.rst:137 -msgid "Fix ``__path__`` to allow editable extensions (:issue:`5213`)" -msgstr "" - -#: ../../whats_new.rst:142 -#, fuzzy -msgid "v1.4.0" -msgstr "v1.2.0" - -#: ../../whats_new.rst:144 -msgid "" -"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!" -msgstr "" - -#: ../../whats_new.rst:151 -msgid "" -"Add support for :class:`AllowedMentions` to have more control over what " -"gets mentioned." -msgstr "" - -#: ../../whats_new.rst:150 -msgid "This can be set globally through :attr:`Client.allowed_mentions`" -msgstr "" - -#: ../../whats_new.rst:151 -msgid "" -"This can also be set on a per message basis via " -":meth:`abc.Messageable.send`" -msgstr "" - -#: ../../whats_new.rst:159 -msgid "" -":class:`AutoShardedClient` has been completely redesigned from the ground" -" up to better suit multi-process clusters (:issue:`2654`)" -msgstr "" - -#: ../../whats_new.rst:154 -msgid "" -"Add :class:`ShardInfo` which allows fetching specific information about a" -" shard." -msgstr "" - -#: ../../whats_new.rst:155 -msgid "" -"The :class:`ShardInfo` allows for reconnecting and disconnecting of a " -"specific shard as well." -msgstr "" - -#: ../../whats_new.rst:156 -msgid "" -"Add :meth:`AutoShardedClient.get_shard` and " -":attr:`AutoShardedClient.shards` to get information about shards." -msgstr "" - -#: ../../whats_new.rst:157 -msgid "" -"Rework the entire connection flow to better facilitate the ``IDENTIFY`` " -"rate limits." -msgstr "" - -#: ../../whats_new.rst:158 -msgid "" -"Add a hook :meth:`Client.before_identify_hook` to have better control " -"over what happens before an ``IDENTIFY`` is done." -msgstr "" - -#: ../../whats_new.rst:159 -msgid "" -"Add more shard related events such as :func:`on_shard_connect`, " -":func:`on_shard_disconnect` and :func:`on_shard_resumed`." -msgstr "" - -#: ../../whats_new.rst:165 -msgid "Add support for guild templates (:issue:`2652`)" -msgstr "" - -#: ../../whats_new.rst:162 -msgid "This adds :class:`Template` to read a template's information." -msgstr "" - -#: ../../whats_new.rst:163 -msgid "" -":meth:`Client.fetch_template` can be used to fetch a template's " -"information from the API." -msgstr "" - -#: ../../whats_new.rst:164 -msgid "" -":meth:`Client.create_guild` can now take an optional template to base the" -" creation from." -msgstr "" - -#: ../../whats_new.rst:165 -msgid "" -"Note that fetching a guild's template is currently restricted for bot " -"accounts." -msgstr "" - -#: ../../whats_new.rst:175 -msgid "Add support for guild integrations (:issue:`2051`, :issue:`1083`)" -msgstr "" - -#: ../../whats_new.rst:168 -msgid ":class:`Integration` is used to read integration information." -msgstr "" - -#: ../../whats_new.rst:169 -msgid "" -":class:`IntegrationAccount` is used to read integration account " -"information." -msgstr "" - -#: ../../whats_new.rst:170 -msgid ":meth:`Guild.integrations` will fetch all integrations in a guild." -msgstr "" - -#: ../../whats_new.rst:171 -msgid ":meth:`Guild.create_integration` will create an integration." -msgstr "" - -#: ../../whats_new.rst:172 -msgid ":meth:`Integration.edit` will edit an existing integration." -msgstr "" - -#: ../../whats_new.rst:173 -msgid ":meth:`Integration.delete` will delete an integration." -msgstr "" - -#: ../../whats_new.rst:174 -msgid ":meth:`Integration.sync` will sync an integration." -msgstr "" - -#: ../../whats_new.rst:175 -msgid "There is currently no support in the audit log for this." -msgstr "" - -#: ../../whats_new.rst:177 -msgid "" -"Add an alias for :attr:`VerificationLevel.extreme` under " -":attr:`VerificationLevel.very_high` (:issue:`2650`)" -msgstr "" - -#: ../../whats_new.rst:178 -msgid "Add various grey to gray aliases for :class:`Colour` (:issue:`5130`)" -msgstr "" - -#: ../../whats_new.rst:179 -msgid "" -"Added :attr:`VoiceClient.latency` and :attr:`VoiceClient.average_latency`" -" (:issue:`2535`)" -msgstr "" - -#: ../../whats_new.rst:180 -msgid "" -"Add ``use_cached`` and ``spoiler`` parameters to " -":meth:`Attachment.to_file` (:issue:`2577`, :issue:`4095`)" -msgstr "" - -#: ../../whats_new.rst:181 -msgid "" -"Add ``position`` parameter support to :meth:`Guild.create_category` " -"(:issue:`2623`)" -msgstr "" - -#: ../../whats_new.rst:182 -msgid "Allow passing ``int`` for the colour in :meth:`Role.edit` (:issue:`4057`)" -msgstr "" - -#: ../../whats_new.rst:183 -msgid "" -"Add :meth:`Embed.remove_author` to clear author information from an embed" -" (:issue:`4068`)" -msgstr "" - -#: ../../whats_new.rst:184 -msgid "" -"Add the ability to clear images and thumbnails in embeds using " -":attr:`Embed.Empty` (:issue:`4053`)" -msgstr "" - -#: ../../whats_new.rst:185 -msgid "Add :attr:`Guild.max_video_channel_users` (:issue:`4120`)" -msgstr "" - -#: ../../whats_new.rst:186 -msgid "Add :attr:`Guild.public_updates_channel` (:issue:`4120`)" -msgstr "" - -#: ../../whats_new.rst:187 -msgid "" -"Add ``guild_ready_timeout`` parameter to :class:`Client` and subclasses " -"to control timeouts when the ``GUILD_CREATE`` stream takes too long " -"(:issue:`4112`)" -msgstr "" - -#: ../../whats_new.rst:188 -msgid "" -"Add support for public user flags via :attr:`User.public_flags` and " -":class:`PublicUserFlags` (:issue:`3999`)" -msgstr "" - -#: ../../whats_new.rst:189 -msgid "" -"Allow changing of channel types via :meth:`TextChannel.edit` to and from " -"a news channel (:issue:`4121`)" -msgstr "" - -#: ../../whats_new.rst:190 -msgid "" -"Add :meth:`Guild.edit_role_positions` to bulk edit role positions in a " -"single API call (:issue:`2501`, :issue:`2143`)" -msgstr "" - -#: ../../whats_new.rst:191 -msgid "" -"Add :meth:`Guild.change_voice_state` to change your voice state in a " -"guild (:issue:`5088`)" -msgstr "" - -#: ../../whats_new.rst:192 -msgid "" -"Add :meth:`PartialInviteGuild.is_icon_animated` for checking if the " -"invite guild has animated icon (:issue:`4180`, :issue:`4181`)" -msgstr "" - -#: ../../whats_new.rst:193 -msgid "" -"Add :meth:`PartialInviteGuild.icon_url_as` now supports ``static_format``" -" for consistency (:issue:`4180`, :issue:`4181`)" -msgstr "" - -#: ../../whats_new.rst:194 -msgid "Add support for ``user_ids`` in :meth:`Guild.query_members`" -msgstr "" - -#: ../../whats_new.rst:195 -msgid "" -"Add support for pruning members by roles in :meth:`Guild.prune_members` " -"(:issue:`4043`)" -msgstr "" - -#: ../../whats_new.rst:196 -msgid "" -"|commands| Implement :func:`~ext.commands.before_invoke` and " -":func:`~ext.commands.after_invoke` decorators (:issue:`1986`, " -":issue:`2502`)" -msgstr "" - -#: ../../whats_new.rst:197 -msgid "" -"|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`)" -msgstr "" - -#: ../../whats_new.rst:198 -msgid "" -"|commands| Add a way to dynamically add and remove checks from a " -":class:`HelpCommand <.ext.commands.HelpCommand>` (:issue:`5197`)" -msgstr "" - -#: ../../whats_new.rst:199 -msgid "" -"|tasks| Add :meth:`Loop.is_running <.ext.tasks.Loop.is_running>` method " -"to the task objects (:issue:`2540`)" -msgstr "" - -#: ../../whats_new.rst:200 -msgid "" -"|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`)" -msgstr "" - -#: ../../whats_new.rst:206 -msgid "" -"Fix issue with :attr:`PartialEmoji.url` reads leading to a failure " -"(:issue:`4015`, :issue:`4016`)" -msgstr "" - -#: ../../whats_new.rst:207 -msgid "" -"Allow :meth:`abc.Messageable.history` to take a limit of ``1`` even if " -"``around`` is passed (:issue:`4019`)" -msgstr "" - -#: ../../whats_new.rst:208 -msgid "" -"Fix :attr:`Guild.member_count` not updating in certain cases when a " -"member has left the guild (:issue:`4021`)" -msgstr "" - -#: ../../whats_new.rst:209 -msgid "" -"Fix the type of :attr:`Object.id` not being validated. For backwards " -"compatibility ``str`` is still allowed but is converted to ``int`` " -"(:issue:`4002`)" -msgstr "" - -#: ../../whats_new.rst:210 -msgid "" -"Fix :meth:`Guild.edit` not allowing editing of notification settings " -"(:issue:`4074`, :issue:`4047`)" -msgstr "" - -#: ../../whats_new.rst:211 -msgid "" -"Fix crash when the guild widget contains channels that aren't in the " -"payload (:issue:`4114`, :issue:`4115`)" -msgstr "" - -#: ../../whats_new.rst:212 -msgid "" -"Close ffmpeg stdin handling from spawned processes with " -":class:`FFmpegOpusAudio` and :class:`FFmpegPCMAudio` (:issue:`4036`)" -msgstr "" - -#: ../../whats_new.rst:213 -msgid "" -"Fix :func:`utils.escape_markdown` not escaping masked links " -"(:issue:`4206`, :issue:`4207`)" -msgstr "" - -#: ../../whats_new.rst:214 -msgid "" -"Fix reconnect loop due to failed handshake on region change " -"(:issue:`4210`, :issue:`3996`)" -msgstr "" - -#: ../../whats_new.rst:215 -msgid "" -"Fix :meth:`Guild.by_category` not returning empty categories " -"(:issue:`4186`)" -msgstr "" - -#: ../../whats_new.rst:216 -msgid "Fix certain JPEG images not being identified as JPEG (:issue:`5143`)" -msgstr "" - -#: ../../whats_new.rst:217 -msgid "" -"Fix a crash when an incomplete guild object is used when fetching " -"reaction information (:issue:`5181`)" -msgstr "" - -#: ../../whats_new.rst:218 -msgid "" -"Fix a timeout issue when fetching members using " -":meth:`Guild.query_members`" -msgstr "" - -#: ../../whats_new.rst:219 -msgid "" -"Fix an issue with domain resolution in voice (:issue:`5188`, " -":issue:`5191`)" -msgstr "" - -#: ../../whats_new.rst:220 -msgid "" -"Fix an issue where :attr:`PartialEmoji.id` could be a string " -"(:issue:`4153`, :issue:`4152`)" -msgstr "" - -#: ../../whats_new.rst:221 -msgid "Fix regression where :attr:`Member.activities` would not clear." -msgstr "" - -#: ../../whats_new.rst:222 -msgid "" -"|commands| A :exc:`TypeError` is now raised when :obj:`typing.Optional` " -"is used within :data:`commands.Greedy <.ext.commands.Greedy>` " -"(:issue:`2253`, :issue:`5068`)" -msgstr "" - -#: ../../whats_new.rst:223 -msgid "" -"|commands| :meth:`Bot.walk_commands <.ext.commands.Bot.walk_commands>` no" -" longer yields duplicate commands due to aliases (:issue:`2591`)" -msgstr "" - -#: ../../whats_new.rst:224 -msgid "" -"|commands| Fix regex characters not being escaped in " -":attr:`HelpCommand.clean_prefix <.ext.commands.HelpCommand.clean_prefix>`" -" (:issue:`4058`, :issue:`4071`)" -msgstr "" - -#: ../../whats_new.rst:225 -msgid "" -"|commands| Fix :meth:`Bot.get_command <.ext.commands.Bot.get_command>` " -"from raising errors when a name only has whitespace (:issue:`5124`)" -msgstr "" - -#: ../../whats_new.rst:226 -msgid "" -"|commands| Fix issue with :attr:`Context.subcommand_passed " -"<.ext.commands.Context.subcommand_passed>` not functioning as expected " -"(:issue:`5198`)" -msgstr "" - -#: ../../whats_new.rst:227 -msgid "" -"|tasks| Task objects are no longer stored globally so two class instances" -" can now start two separate tasks (:issue:`2294`)" -msgstr "" - -#: ../../whats_new.rst:228 -msgid "" -"|tasks| Allow cancelling the loop within :meth:`before_loop " -"<.ext.tasks.Loop.before_loop>` (:issue:`4082`)" -msgstr "" - -#: ../../whats_new.rst:234 -msgid "" -"The :attr:`Member.roles` cache introduced in v1.3 was reverted due to " -"issues caused (:issue:`4087`, :issue:`4157`)" -msgstr "" - -#: ../../whats_new.rst:235 -msgid ":class:`Webhook` objects are now comparable and hashable (:issue:`4182`)" -msgstr "" - -#: ../../whats_new.rst:239 -msgid "" -"Some more API requests got a ``reason`` parameter for audit logs " -"(:issue:`5086`)" -msgstr "" - -#: ../../whats_new.rst:237 -msgid ":meth:`TextChannel.follow`" -msgstr "" - -#: ../../whats_new.rst:238 -msgid ":meth:`Message.pin` and :meth:`Message.unpin`" -msgstr "" - -#: ../../whats_new.rst:239 -msgid ":meth:`Webhook.delete` and :meth:`Webhook.edit`" -msgstr "" - -#: ../../whats_new.rst:241 -msgid "" -"For performance reasons ``websockets`` has been dropped in favour of " -"``aiohttp.ws``." -msgstr "" - -#: ../../whats_new.rst:242 -msgid "" -"The blocking logging message now shows the stack trace of where the main " -"thread was blocking" -msgstr "" - -#: ../../whats_new.rst:243 -msgid "" -"The domain name was changed from ``discordapp.com`` to ``discord.com`` to" -" prepare for the required domain migration" -msgstr "" - -#: ../../whats_new.rst:244 -msgid "" -"Reduce memory usage when reconnecting due to stale references being held " -"by the message cache (:issue:`5133`)" -msgstr "" - -#: ../../whats_new.rst:245 -#, python-format -msgid "" -"Optimize :meth:`abc.GuildChannel.permissions_for` by not creating as many" -" temporary objects (20-32% savings)." -msgstr "" - -#: ../../whats_new.rst:246 -msgid "" -"|commands| Raise :exc:`~ext.commands.CommandRegistrationError` instead of" -" :exc:`ClientException` when a duplicate error is registered " -"(:issue:`4217`)" -msgstr "" - -#: ../../whats_new.rst:247 -msgid "" -"|tasks| No longer handle :exc:`HTTPException` by default in the task " -"reconnect loop (:issue:`5193`)" -msgstr "" - -#: ../../whats_new.rst:252 -#, fuzzy -msgid "v1.3.4" -msgstr "v1.2.2" - -#: ../../whats_new.rst:257 -msgid "" -"Fix an issue with channel overwrites causing multiple issues including " -"crashes (:issue:`5109`)" -msgstr "" - -#: ../../whats_new.rst:262 -#, fuzzy -msgid "v1.3.3" -msgstr "v1.2.2" - -#: ../../whats_new.rst:268 -msgid "Change default WS close to 4000 instead of 1000." -msgstr "" - -#: ../../whats_new.rst:268 -msgid "" -"The previous close code caused sessions to be invalidated at a higher " -"frequency than desired." -msgstr "" - -#: ../../whats_new.rst:270 -msgid "Fix ``None`` appearing in ``Member.activities``. (:issue:`2619`)" -msgstr "" - -#: ../../whats_new.rst:275 -#, fuzzy -msgid "v1.3.2" -msgstr "v1.2.2" - -#: ../../whats_new.rst:277 -msgid "Another minor bug fix release." -msgstr "" - -#: ../../whats_new.rst:282 -msgid "" -"Higher the wait time during the ``GUILD_CREATE`` stream before " -"``on_ready`` is fired for :class:`AutoShardedClient`." -msgstr "" - -#: ../../whats_new.rst:283 -msgid "" -":func:`on_voice_state_update` now uses the inner ``member`` payload which" -" should make it more reliable." -msgstr "" - -#: ../../whats_new.rst:284 -msgid "Fix various Cloudflare handling errors (:issue:`2572`, :issue:`2544`)" -msgstr "" - -#: ../../whats_new.rst:285 -msgid "" -"Fix crashes if :attr:`Message.guild` is :class:`Object` instead of " -":class:`Guild`." -msgstr "" - -#: ../../whats_new.rst:286 -msgid "" -"Fix :meth:`Webhook.send` returning an empty string instead of ``None`` " -"when ``wait=False``." -msgstr "" - -#: ../../whats_new.rst:287 -msgid "Fix invalid format specifier in webhook state (:issue:`2570`)" -msgstr "" - -#: ../../whats_new.rst:288 -msgid "" -"|commands| Passing invalid permissions to permission related checks now " -"raises ``TypeError``." -msgstr "" - -#: ../../whats_new.rst:293 -#, fuzzy -msgid "v1.3.1" -msgstr "v1.2.1" - -#: ../../whats_new.rst:295 -msgid "Minor bug fix release." -msgstr "" - -#: ../../whats_new.rst:300 -msgid "Fix fetching invites in guilds that the user is not in." -msgstr "" - -#: ../../whats_new.rst:301 -msgid "" -"Fix the channel returned from :meth:`Client.fetch_channel` raising when " -"sending messages. (:issue:`2531`)" -msgstr "" - -#: ../../whats_new.rst:306 -msgid "Fix compatibility warnings when using the Python 3.9 alpha." -msgstr "" - -#: ../../whats_new.rst:307 -msgid "Change the unknown event logging from WARNING to DEBUG to reduce noise." -msgstr "" - -#: ../../whats_new.rst:312 -#, fuzzy -msgid "v1.3.0" -msgstr "v1.2.0" - -#: ../../whats_new.rst:314 -msgid "" -"This version comes with a lot of bug fixes and new features. It's been in" -" development for a lot longer than was anticipated!" -msgstr "" - -#: ../../whats_new.rst:319 -msgid "" -"Add :meth:`Guild.fetch_members` to fetch members from the HTTP API. " -"(:issue:`2204`)" -msgstr "" - -#: ../../whats_new.rst:320 -msgid "" -"Add :meth:`Guild.fetch_roles` to fetch roles from the HTTP API. " -"(:issue:`2208`)" -msgstr "" - -#: ../../whats_new.rst:321 -msgid "" -"Add support for teams via :class:`Team` when fetching with " -":meth:`Client.application_info`. (:issue:`2239`)" -msgstr "" - -#: ../../whats_new.rst:322 -msgid "Add support for suppressing embeds via :meth:`Message.edit`" -msgstr "" - -#: ../../whats_new.rst:323 -msgid "" -"Add support for guild subscriptions. See the :class:`Client` " -"documentation for more details." -msgstr "" - -#: ../../whats_new.rst:324 -msgid "" -"Add :attr:`VoiceChannel.voice_states` to get voice states without relying" -" on member cache." -msgstr "" - -#: ../../whats_new.rst:325 -msgid "Add :meth:`Guild.query_members` to request members from the gateway." -msgstr "" - -#: ../../whats_new.rst:326 -msgid "Add :class:`FFmpegOpusAudio` and other voice improvements. (:issue:`2258`)" -msgstr "" - -#: ../../whats_new.rst:327 -msgid "" -"Add :attr:`RawMessageUpdateEvent.channel_id` for retrieving channel IDs " -"during raw message updates. (:issue:`2301`)" -msgstr "" - -#: ../../whats_new.rst:328 -msgid "" -"Add :attr:`RawReactionActionEvent.event_type` to disambiguate between " -"reaction addition and removal in reaction events." -msgstr "" - -#: ../../whats_new.rst:329 -msgid "" -"Add :attr:`abc.GuildChannel.permissions_synced` to query whether " -"permissions are synced with the category. (:issue:`2300`, :issue:`2324`)" -msgstr "" - -#: ../../whats_new.rst:330 -msgid "" -"Add :attr:`MessageType.channel_follow_add` message type for announcement " -"channels being followed. (:issue:`2314`)" -msgstr "" - -#: ../../whats_new.rst:331 -msgid "" -"Add :meth:`Message.is_system` to allow for quickly filtering through " -"system messages." -msgstr "" - -#: ../../whats_new.rst:332 -msgid "" -"Add :attr:`VoiceState.self_stream` to indicate whether someone is " -"streaming via Go Live. (:issue:`2343`)" -msgstr "" - -#: ../../whats_new.rst:333 -msgid "" -"Add :meth:`Emoji.is_usable` to check if the client user can use an emoji." -" (:issue:`2349`)" -msgstr "" - -#: ../../whats_new.rst:334 -msgid "" -"Add :attr:`VoiceRegion.europe` and :attr:`VoiceRegion.dubai`. " -"(:issue:`2358`, :issue:`2490`)" -msgstr "" - -#: ../../whats_new.rst:335 -msgid "Add :meth:`TextChannel.follow` to follow a news channel. (:issue:`2367`)" -msgstr "" - -#: ../../whats_new.rst:336 -msgid "Add :attr:`Permissions.view_guild_insights` permission. (:issue:`2415`)" -msgstr "" - -#: ../../whats_new.rst:338 -msgid "" -"Add support for new audit log types. See :ref:`discord-api-audit-logs` " -"for more information. (:issue:`2427`)" -msgstr "" - -#: ../../whats_new.rst:338 -msgid "Note that integration support is not finalized." -msgstr "" - -#: ../../whats_new.rst:340 -msgid "" -"Add :attr:`Webhook.type` to query the type of webhook " -"(:class:`WebhookType`). (:issue:`2441`)" -msgstr "" - -#: ../../whats_new.rst:341 -msgid "" -"Allow bulk editing of channel overwrites through " -":meth:`abc.GuildChannel.edit`. (:issue:`2198`)" -msgstr "" - -#: ../../whats_new.rst:342 -msgid "" -"Add :class:`Activity.created_at` to see when an activity was started. " -"(:issue:`2446`)" -msgstr "" - -#: ../../whats_new.rst:343 -msgid "" -"Add support for ``xsalsa20_poly1305_lite`` encryption mode for voice. " -"(:issue:`2463`)" -msgstr "" - -#: ../../whats_new.rst:344 -msgid "" -"Add :attr:`RawReactionActionEvent.member` to get the member who did the " -"reaction. (:issue:`2443`)" -msgstr "" - -#: ../../whats_new.rst:345 -msgid "" -"Add support for new YouTube streaming via :attr:`Streaming.platform` and " -":attr:`Streaming.game`. (:issue:`2445`)" -msgstr "" - -#: ../../whats_new.rst:346 -msgid "" -"Add :attr:`Guild.discovery_splash_url` to get the discovery splash image " -"asset. (:issue:`2482`)" -msgstr "" - -#: ../../whats_new.rst:348 -msgid "" -"Add :attr:`Guild.rules_channel` to get the rules channel of public " -"guilds. (:issue:`2482`)" -msgstr "" - -#: ../../whats_new.rst:348 -msgid "" -"It should be noted that this feature is restricted to those who are " -"either in Server Discovery or planning to be there." -msgstr "" - -#: ../../whats_new.rst:350 -msgid "" -"Add support for message flags via :attr:`Message.flags` and " -":class:`MessageFlags`. (:issue:`2433`)" -msgstr "" - -#: ../../whats_new.rst:351 -msgid "" -"Add :attr:`User.system` and :attr:`Profile.system` to know whether a user" -" is an official Discord Trust and Safety account." -msgstr "" - -#: ../../whats_new.rst:352 -msgid "" -"Add :attr:`Profile.team_user` to check whether a user is a member of a " -"team." -msgstr "" - -#: ../../whats_new.rst:353 -msgid "" -"Add :meth:`Attachment.to_file` to easily convert attachments to " -":class:`File` for sending." -msgstr "" - -#: ../../whats_new.rst:357 -msgid "" -"Add certain aliases to :class:`Permissions` to match the UI better. " -"(:issue:`2496`)" -msgstr "" - -#: ../../whats_new.rst:355 -msgid ":attr:`Permissions.manage_permissions`" -msgstr "" - -#: ../../whats_new.rst:356 -msgid ":attr:`Permissions.view_channel`" -msgstr "" - -#: ../../whats_new.rst:357 -msgid ":attr:`Permissions.use_external_emojis`" -msgstr "" - -#: ../../whats_new.rst:359 -msgid "" -"Add support for passing keyword arguments when creating " -":class:`Permissions`." -msgstr "" - -#: ../../whats_new.rst:361 -msgid "" -"Add support for custom activities via :class:`CustomActivity`. " -"(:issue:`2400`)" -msgstr "" - -#: ../../whats_new.rst:361 -msgid "Note that as of now, bots cannot send custom activities yet." -msgstr "" - -#: ../../whats_new.rst:363 -msgid "" -"Add support for :func:`on_invite_create` and :func:`on_invite_delete` " -"events." -msgstr "" - -#: ../../whats_new.rst:366 -msgid "Add support for clearing a specific reaction emoji from a message." -msgstr "" - -#: ../../whats_new.rst:365 -msgid ":meth:`Message.clear_reaction` and :meth:`Reaction.clear` methods." -msgstr "" - -#: ../../whats_new.rst:366 -msgid "" -":func:`on_raw_reaction_clear_emoji` and :func:`on_reaction_clear_emoji` " -"events." -msgstr "" - -#: ../../whats_new.rst:368 -msgid "" -"Add :func:`utils.sleep_until` helper to sleep until a specific datetime. " -"(:issue:`2517`, :issue:`2519`)" -msgstr "" - -#: ../../whats_new.rst:369 -msgid "" -"|commands| Add support for teams and :attr:`Bot.owner_ids " -"<.ext.commands.Bot.owner_ids>` to have multiple bot owners. " -"(:issue:`2239`)" -msgstr "" - -#: ../../whats_new.rst:370 -msgid "" -"|commands| Add new :attr:`BucketType.role " -"<.ext.commands.BucketType.role>` bucket type. (:issue:`2201`)" -msgstr "" - -#: ../../whats_new.rst:371 -msgid "" -"|commands| Expose :attr:`Command.cog <.ext.commands.Command.cog>` " -"property publicly. (:issue:`2360`)" -msgstr "" - -#: ../../whats_new.rst:372 -msgid "" -"|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`)" -msgstr "" - -#: ../../whats_new.rst:373 -msgid "" -"|commands| Add :func:`has_guild_permissions " -"<.ext.commands.has_guild_permissions>` check. (:issue:`2460`)" -msgstr "" - -#: ../../whats_new.rst:374 -msgid "" -"|commands| Add :func:`bot_has_guild_permissions " -"<.ext.commands.bot_has_guild_permissions>` check. (:issue:`2460`)" -msgstr "" - -#: ../../whats_new.rst:375 -msgid "" -"|commands| Add ``predicate`` attribute to checks decorated with " -":func:`~.ext.commands.check`." -msgstr "" - -#: ../../whats_new.rst:376 -msgid "" -"|commands| Add :func:`~.ext.commands.check_any` check to logical OR " -"multiple checks." -msgstr "" - -#: ../../whats_new.rst:377 -msgid "" -"|commands| Add :func:`~.ext.commands.max_concurrency` to allow only a " -"certain amount of users to use a command concurrently before waiting or " -"erroring." -msgstr "" - -#: ../../whats_new.rst:378 -msgid "" -"|commands| Add support for calling a :class:`~.ext.commands.Command` as a" -" regular function." -msgstr "" - -#: ../../whats_new.rst:379 -msgid "" -"|tasks| :meth:`Loop.add_exception_type " -"<.ext.tasks.Loop.add_exception_type>` now allows multiple exceptions to " -"be set. (:issue:`2333`)" -msgstr "" - -#: ../../whats_new.rst:380 -msgid "" -"|tasks| Add :attr:`Loop.next_iteration <.ext.tasks.Loop.next_iteration>` " -"property. (:issue:`2305`)" -msgstr "" - -#: ../../whats_new.rst:385 -msgid "" -"Fix issue with permission resolution sometimes failing for guilds with no" -" owner." -msgstr "" - -#: ../../whats_new.rst:386 -msgid "Tokens are now stripped upon use. (:issue:`2135`)" -msgstr "" - -#: ../../whats_new.rst:387 -msgid "" -"Passing in a ``name`` is no longer required for :meth:`Emoji.edit`. " -"(:issue:`2368`)" -msgstr "" - -#: ../../whats_new.rst:388 -msgid "" -"Fix issue with webhooks not re-raising after retries have run out. " -"(:issue:`2272`, :issue:`2380`)" -msgstr "" - -#: ../../whats_new.rst:389 -msgid "" -"Fix mismatch in URL handling in :func:`utils.escape_markdown`. " -"(:issue:`2420`)" -msgstr "" - -#: ../../whats_new.rst:390 -msgid "" -"Fix issue with ports being read in little endian when they should be big " -"endian in voice connections. (:issue:`2470`)" -msgstr "" - -#: ../../whats_new.rst:391 -msgid "" -"Fix :meth:`Member.mentioned_in` not taking into consideration the " -"message's guild." -msgstr "" - -#: ../../whats_new.rst:392 -msgid "" -"Fix bug with moving channels when there are gaps in positions due to " -"channel deletion and creation." -msgstr "" - -#: ../../whats_new.rst:393 -msgid "" -"Fix :func:`on_shard_ready` not triggering when ``fetch_offline_members`` " -"is disabled. (:issue:`2504`)" -msgstr "" - -#: ../../whats_new.rst:394 -msgid "" -"Fix issue with large sharded bots taking too long to actually dispatch " -":func:`on_ready`." -msgstr "" - -#: ../../whats_new.rst:395 -msgid "" -"Fix issue with fetching group DM based invites in " -":meth:`Client.fetch_invite`." -msgstr "" - -#: ../../whats_new.rst:396 -msgid "Fix out of order files being sent in webhooks when there are 10 files." -msgstr "" - -#: ../../whats_new.rst:397 -msgid "" -"|commands| Extensions that fail internally due to ImportError will no " -"longer raise :exc:`~.ext.commands.ExtensionNotFound`. (:issue:`2244`, " -":issue:`2275`, :issue:`2291`)" -msgstr "" - -#: ../../whats_new.rst:398 -msgid "" -"|commands| Updating the :attr:`Paginator.suffix " -"<.ext.commands.Paginator.suffix>` will not cause out of date " -"calculations. (:issue:`2251`)" -msgstr "" - -#: ../../whats_new.rst:399 -msgid "" -"|commands| Allow converters from custom extension packages. " -"(:issue:`2369`, :issue:`2374`)" -msgstr "" - -#: ../../whats_new.rst:400 -msgid "" -"|commands| Fix issue with paginator prefix being ``None`` causing empty " -"pages. (:issue:`2471`)" -msgstr "" - -#: ../../whats_new.rst:401 -msgid "" -"|commands| :class:`~.commands.Greedy` now ignores parsing errors rather " -"than propagating them." -msgstr "" - -#: ../../whats_new.rst:402 -msgid "" -"|commands| :meth:`Command.can_run <.ext.commands.Command.can_run>` now " -"checks whether a command is disabled." -msgstr "" - -#: ../../whats_new.rst:403 -msgid "" -"|commands| :attr:`HelpCommand.clean_prefix " -"<.ext.commands.HelpCommand.clean_prefix>` now takes into consideration " -"nickname mentions. (:issue:`2489`)" -msgstr "" - -#: ../../whats_new.rst:404 -msgid "" -"|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." -msgstr "" - -#: ../../whats_new.rst:409 -msgid "The library now fully supports Python 3.8 without warnings." -msgstr "" - -#: ../../whats_new.rst:410 -msgid "" -"Bump the dependency of ``websockets`` to 8.0 for those who can use it. " -"(:issue:`2453`)" -msgstr "" - -#: ../../whats_new.rst:411 -msgid "" -"Due to Discord providing :class:`Member` data in mentions, users will now" -" be upgraded to :class:`Member` more often if mentioned." -msgstr "" - -#: ../../whats_new.rst:412 -msgid ":func:`utils.escape_markdown` now properly escapes new quote markdown." -msgstr "" - -#: ../../whats_new.rst:413 -msgid "" -"The message cache can now be disabled by passing ``None`` to " -"``max_messages`` in :class:`Client`." -msgstr "" - -#: ../../whats_new.rst:414 -msgid "" -"The default message cache size has changed from 5000 to 1000 to " -"accommodate small bots." -msgstr "" - -#: ../../whats_new.rst:415 -msgid "" -"Lower memory usage by only creating certain objects as needed in " -":class:`Role`." -msgstr "" - -#: ../../whats_new.rst:416 -msgid "" -"There is now a sleep of 5 seconds before re-IDENTIFYing during a " -"reconnect to prevent long loops of session invalidation." -msgstr "" - -#: ../../whats_new.rst:418 -msgid "" -"The rate limiting code now uses millisecond precision to have more " -"granular rate limit handling." -msgstr "" - -#: ../../whats_new.rst:418 -msgid "" -"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`." -msgstr "" - -#: ../../whats_new.rst:420 -msgid "" -"The performance of :attr:`Guild.default_role` has been improved from O(N)" -" to O(1). (:issue:`2375`)" -msgstr "" - -#: ../../whats_new.rst:421 -msgid "" -"The performance of :attr:`Member.roles` has improved due to usage of " -"caching to avoid surprising performance traps." -msgstr "" - -#: ../../whats_new.rst:422 -msgid "" -"The GC is manually triggered during things that cause large deallocations" -" (such as guild removal) to prevent memory fragmentation." -msgstr "" - -#: ../../whats_new.rst:423 -msgid "" -"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." -msgstr "" - -#: ../../whats_new.rst:424 -msgid "" -"The loading of the opus module has been delayed which would make the " -"result of :func:`opus.is_loaded` somewhat surprising." -msgstr "" - -#: ../../whats_new.rst:425 -msgid "" -"|commands| Usernames prefixed with @ inside DMs will properly convert " -"using the :class:`User` converter. (:issue:`2498`)" -msgstr "" - -#: ../../whats_new.rst:426 -msgid "" -"|tasks| The task sleeping time will now take into consideration the " -"amount of time the task body has taken before sleeping. (:issue:`2516`)" -msgstr "" - -#: ../../whats_new.rst:431 -#, fuzzy -msgid "v1.2.5" -msgstr "v1.2.2" - -#: ../../whats_new.rst:436 -msgid "" -"Fix a bug that caused crashes due to missing ``animated`` field in Emoji " -"structures in reactions." -msgstr "" - -#: ../../whats_new.rst:441 -#, fuzzy -msgid "v1.2.4" -msgstr "v1.2.2" - -#: ../../whats_new.rst:446 -msgid "Fix a regression when :attr:`Message.channel` would be ``None``." -msgstr "" - -#: ../../whats_new.rst:447 -msgid "" -"Fix a regression where :attr:`Message.edited_at` would not update during " -"edits." -msgstr "" - -#: ../../whats_new.rst:448 -msgid "" -"Fix a crash that would trigger during message updates (:issue:`2265`, " -":issue:`2287`)." -msgstr "" - -#: ../../whats_new.rst:449 -msgid "" -"Fix a bug when :meth:`VoiceChannel.connect` would not return " -"(:issue:`2274`, :issue:`2372`, :issue:`2373`, :issue:`2377`)." -msgstr "" - -#: ../../whats_new.rst:450 -msgid "Fix a crash relating to token-less webhooks (:issue:`2364`)." -msgstr "" - -#: ../../whats_new.rst:451 -msgid "" -"Fix issue where :attr:`Guild.premium_subscription_count` would be " -"``None`` due to a Discord bug. (:issue:`2331`, :issue:`2376`)." -msgstr "" - -#: ../../whats_new.rst:456 -#, fuzzy -msgid "v1.2.3" -msgstr "v1.2.2" - -#: ../../whats_new.rst:461 -msgid "" -"Fix an AttributeError when accessing :attr:`Member.premium_since` in " -":func:`on_member_update`. (:issue:`2213`)" -msgstr "" - -#: ../../whats_new.rst:462 -msgid "" -"Handle :exc:`asyncio.CancelledError` in :meth:`abc.Messageable.typing` " -"context manager. (:issue:`2218`)" -msgstr "" - -#: ../../whats_new.rst:463 -msgid "" -"Raise the max encoder bitrate to 512kbps to account for nitro boosting. " -"(:issue:`2232`)" -msgstr "" - -#: ../../whats_new.rst:464 -msgid "Properly propagate exceptions in :meth:`Client.run`. (:issue:`2237`)" -msgstr "" - -#: ../../whats_new.rst:465 -msgid "" -"|commands| Ensure cooldowns are properly copied when used in cog level " -"``command_attrs``." -msgstr "" - -#: ../../whats_new.rst:470 -msgid "v1.2.2" -msgstr "v1.2.2" - -#: ../../whats_new.rst:475 -msgid "" -"Audit log related attribute access have been fixed to not error out when " -"they shouldn't have." -msgstr "" - -#: ../../whats_new.rst:480 -msgid "v1.2.1" -msgstr "v1.2.1" - -#: ../../whats_new.rst:485 -msgid ":attr:`User.avatar_url` and related attributes no longer raise an error." -msgstr "" - -#: ../../whats_new.rst:486 -msgid "More compatibility shims with the ``enum.Enum`` code." -msgstr "" - -#: ../../whats_new.rst:491 -msgid "v1.2.0" -msgstr "v1.2.0" - -#: ../../whats_new.rst:493 -msgid "" -"This update mainly brings performance improvements and various nitro " -"boosting attributes (referred to in the API as \"premium guilds\")." -msgstr "" - -#: ../../whats_new.rst:498 -msgid "" -"Add :attr:`Guild.premium_tier` to query the guild's current nitro boost " -"level." -msgstr "" - -#: ../../whats_new.rst:499 -msgid "" -"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." -msgstr "" - -#: ../../whats_new.rst:500 -msgid "" -"Add :attr:`Guild.premium_subscription_count` to query how many members " -"are boosting a guild." -msgstr "" - -#: ../../whats_new.rst:501 -msgid "" -"Add :attr:`Member.premium_since` to query since when a member has boosted" -" a guild." -msgstr "" - -#: ../../whats_new.rst:502 -msgid "" -"Add :attr:`Guild.premium_subscribers` to query all the members currently " -"boosting the guild." -msgstr "" - -#: ../../whats_new.rst:503 -msgid "" -"Add :attr:`Guild.system_channel_flags` to query the settings for a " -"guild's :attr:`Guild.system_channel`." -msgstr "" - -#: ../../whats_new.rst:504 -msgid "This includes a new type named :class:`SystemChannelFlags`" -msgstr "" - -#: ../../whats_new.rst:505 -msgid "" -"Add :attr:`Emoji.available` to query if an emoji can be used (within the " -"guild or otherwise)." -msgstr "" - -#: ../../whats_new.rst:506 -msgid "" -"Add support for animated icons in :meth:`Guild.icon_url_as` and " -":attr:`Guild.icon_url`." -msgstr "" - -#: ../../whats_new.rst:507 -msgid "Add :meth:`Guild.is_icon_animated`." -msgstr "" - -#: ../../whats_new.rst:508 -msgid "" -"Add support for the various new :class:`MessageType` involving nitro " -"boosting." -msgstr "" - -#: ../../whats_new.rst:509 -msgid "Add :attr:`VoiceRegion.india`. (:issue:`2145`)" -msgstr "" - -#: ../../whats_new.rst:510 -msgid "Add :meth:`Embed.insert_field_at`. (:issue:`2178`)" -msgstr "" - -#: ../../whats_new.rst:511 -msgid "" -"Add a ``type`` attribute for all channels to their appropriate " -":class:`ChannelType`. (:issue:`2185`)" -msgstr "" - -#: ../../whats_new.rst:512 -msgid "" -"Add :meth:`Client.fetch_channel` to fetch a channel by ID via HTTP. " -"(:issue:`2169`)" -msgstr "" - -#: ../../whats_new.rst:513 -msgid "" -"Add :meth:`Guild.fetch_channels` to fetch all channels via HTTP. " -"(:issue:`2169`)" -msgstr "" - -#: ../../whats_new.rst:514 -msgid "" -"|tasks| Add :meth:`Loop.stop <.ext.tasks.Loop.stop>` to gracefully stop a" -" task rather than cancelling." -msgstr "" - -#: ../../whats_new.rst:515 -msgid "" -"|tasks| Add :meth:`Loop.failed <.ext.tasks.Loop.failed>` to query if a " -"task had failed somehow." -msgstr "" - -#: ../../whats_new.rst:516 -msgid "" -"|tasks| Add :meth:`Loop.change_interval " -"<.ext.tasks.Loop.change_interval>` to change the sleep interval at " -"runtime (:issue:`2158`, :issue:`2162`)" -msgstr "" - -#: ../../whats_new.rst:521 -msgid "Fix internal error when using :meth:`Guild.prune_members`." -msgstr "" - -#: ../../whats_new.rst:522 -msgid "" -"|commands| Fix :attr:`.Command.invoked_subcommand` being invalid in many " -"cases." -msgstr "" - -#: ../../whats_new.rst:523 -msgid "|tasks| Reset iteration count when the loop terminates and is restarted." -msgstr "" - -#: ../../whats_new.rst:524 -msgid "" -"|tasks| The decorator interface now works as expected when stacking " -"(:issue:`2154`)" -msgstr "" - -#: ../../whats_new.rst:530 -msgid "Improve performance of all Enum related code significantly." -msgstr "" - -#: ../../whats_new.rst:530 -msgid "" -"This was done by replacing the ``enum.Enum`` code with an API compatible " -"one." -msgstr "" - -#: ../../whats_new.rst:531 -msgid "This should not be a breaking change for most users due to duck-typing." -msgstr "" - -#: ../../whats_new.rst:532 -msgid "Improve performance of message creation by about 1.5x." -msgstr "" - -#: ../../whats_new.rst:533 -msgid "" -"Improve performance of message editing by about 1.5-4x depending on " -"payload size." -msgstr "" - -#: ../../whats_new.rst:534 -msgid "Improve performance of attribute access on :class:`Member` about by 2x." -msgstr "" - -#: ../../whats_new.rst:535 -msgid "" -"Improve performance of :func:`utils.get` by around 4-6x depending on " -"usage." -msgstr "" - -#: ../../whats_new.rst:536 -msgid "Improve performance of event parsing lookup by around 2.5x." -msgstr "" - -#: ../../whats_new.rst:537 -msgid "" -"Keyword arguments in :meth:`Client.start` and :meth:`Client.run` are now " -"validated (:issue:`953`, :issue:`2170`)" -msgstr "" - -#: ../../whats_new.rst:538 -msgid "" -"The Discord error code is now shown in the exception message for " -":exc:`HTTPException`." -msgstr "" - -#: ../../whats_new.rst:539 -msgid "" -"Internal tasks launched by the library will now have their own custom " -"``__repr__``." -msgstr "" - -#: ../../whats_new.rst:540 -msgid "" -"All public facing types should now have a proper and more detailed " -"``__repr__``." -msgstr "" - -#: ../../whats_new.rst:541 -msgid "|tasks| Errors are now logged via the standard :mod:`py:logging` module." -msgstr "" - -#: ../../whats_new.rst:546 -msgid "v1.1.1" -msgstr "v1.1.1" - -#: ../../whats_new.rst:551 -msgid "" -"Webhooks do not overwrite data on retrying their HTTP requests " -"(:issue:`2140`)" -msgstr "" - -#: ../../whats_new.rst:556 -msgid "" -"Add back signal handling to :meth:`Client.run` due to issues some users " -"had with proper cleanup." -msgstr "" - -#: ../../whats_new.rst:561 -msgid "v1.1.0" -msgstr "v1.1.0" - -#: ../../whats_new.rst:566 -msgid "**There is a new extension dedicated to making background tasks easier.**" -msgstr "" - -#: ../../whats_new.rst:567 -msgid "You can check the documentation here: :ref:`ext_tasks_api`." -msgstr "" - -#: ../../whats_new.rst:568 -msgid "Add :attr:`Permissions.stream` permission. (:issue:`2077`)" -msgstr "" - -#: ../../whats_new.rst:569 -msgid "Add equality comparison and hash support to :class:`Asset`" -msgstr "" - -#: ../../whats_new.rst:570 -msgid "" -"Add ``compute_prune_members`` parameter to :meth:`Guild.prune_members` " -"(:issue:`2085`)" -msgstr "" - -#: ../../whats_new.rst:571 -msgid "" -"Add :attr:`Client.cached_messages` attribute to fetch the message cache " -"(:issue:`2086`)" -msgstr "" - -#: ../../whats_new.rst:572 -msgid "" -"Add :meth:`abc.GuildChannel.clone` to clone a guild channel. " -"(:issue:`2093`)" -msgstr "" - -#: ../../whats_new.rst:573 -msgid "" -"Add ``delay`` keyword-only argument to :meth:`Message.delete` " -"(:issue:`2094`)" -msgstr "" - -#: ../../whats_new.rst:574 -msgid "Add support for ``<:name:id>`` when adding reactions (:issue:`2095`)" -msgstr "" - -#: ../../whats_new.rst:575 -msgid "" -"Add :meth:`Asset.read` to fetch the bytes content of an asset " -"(:issue:`2107`)" -msgstr "" - -#: ../../whats_new.rst:576 -msgid "" -"Add :meth:`Attachment.read` to fetch the bytes content of an attachment " -"(:issue:`2118`)" -msgstr "" - -#: ../../whats_new.rst:577 -msgid "" -"Add support for voice kicking by passing ``None`` to " -":meth:`Member.move_to`." -msgstr "" - -#: ../../whats_new.rst:580 ../../whats_new.rst:601 ../../whats_new.rst:620 -msgid "``discord.ext.commands``" -msgstr "" - -#: ../../whats_new.rst:582 -msgid "Add new :func:`~.commands.dm_only` check." -msgstr "" - -#: ../../whats_new.rst:583 -msgid "Support callable converters in :data:`~.commands.Greedy`" -msgstr "" - -#: ../../whats_new.rst:584 -msgid "Add new :class:`~.commands.MessageConverter`." -msgstr "" - -#: ../../whats_new.rst:585 -msgid "This allows you to use :class:`Message` as a type hint in functions." -msgstr "" - -#: ../../whats_new.rst:586 -msgid "" -"Allow passing ``cls`` in the :func:`~.commands.group` decorator " -"(:issue:`2061`)" -msgstr "" - -#: ../../whats_new.rst:587 -msgid "" -"Add :attr:`.Command.parents` to fetch the parents of a command " -"(:issue:`2104`)" -msgstr "" - -#: ../../whats_new.rst:593 -msgid "Fix :exc:`AttributeError` when using ``__repr__`` on :class:`Widget`." -msgstr "" - -#: ../../whats_new.rst:594 -msgid "" -"Fix issue with :attr:`abc.GuildChannel.overwrites` returning ``None`` for" -" keys." -msgstr "" - -#: ../../whats_new.rst:595 -msgid "Remove incorrect legacy NSFW checks in e.g. :meth:`TextChannel.is_nsfw`." -msgstr "" - -#: ../../whats_new.rst:596 -msgid "" -"Fix :exc:`UnboundLocalError` when :class:`RequestsWebhookAdapter` raises " -"an error." -msgstr "" - -#: ../../whats_new.rst:597 -msgid "Fix bug where updating your own user did not update your member instances." -msgstr "" - -#: ../../whats_new.rst:598 -msgid "" -"Tighten constraints of ``__eq__`` in :class:`Spotify` objects " -"(:issue:`2113`, :issue:`2117`)" -msgstr "" - -#: ../../whats_new.rst:603 -msgid "Fix lambda converters in a non-module context (e.g. ``eval``)." -msgstr "" - -#: ../../whats_new.rst:604 -msgid "Use message creation time for reference time when computing cooldowns." -msgstr "" - -#: ../../whats_new.rst:605 -msgid "This prevents cooldowns from triggering during e.g. a RESUME session." -msgstr "" - -#: ../../whats_new.rst:606 -msgid "" -"Fix the default :func:`on_command_error` to work with new-style cogs " -"(:issue:`2094`)" -msgstr "" - -#: ../../whats_new.rst:607 -msgid "" -"DM channels are now recognised as NSFW in :func:`~.commands.is_nsfw` " -"check." -msgstr "" - -#: ../../whats_new.rst:608 -msgid "Fix race condition with help commands (:issue:`2123`)" -msgstr "" - -#: ../../whats_new.rst:609 -msgid "" -"Fix cog descriptions not showing in " -":class:`~.commands.MinimalHelpCommand` (:issue:`2139`)" -msgstr "" - -#: ../../whats_new.rst:614 -msgid "" -"Improve the performance of internal enum creation in the library by about" -" 5x." -msgstr "" - -#: ../../whats_new.rst:615 -msgid "Make the output of ``python -m discord --version`` a bit more useful." -msgstr "" - -#: ../../whats_new.rst:616 -msgid "The loop cleanup facility has been rewritten again." -msgstr "" - -#: ../../whats_new.rst:617 -msgid "The signal handling in :meth:`Client.run` has been removed." -msgstr "" - -#: ../../whats_new.rst:622 -msgid "" -"Custom exception classes are now used for all default checks in the " -"library (:issue:`2101`)" -msgstr "" - -#: ../../whats_new.rst:628 -msgid "v1.0.1" -msgstr "v1.0.1" - -#: ../../whats_new.rst:633 -msgid "Fix issue with speaking state being cast to ``int`` when it was invalid." -msgstr "" - -#: ../../whats_new.rst:634 -msgid "" -"Fix some issues with loop cleanup that some users experienced on Linux " -"machines." -msgstr "" - -#: ../../whats_new.rst:635 -msgid "Fix voice handshake race condition (:issue:`2056`, :issue:`2063`)" -msgstr "" - -#: ../../whats_new.rst:640 -msgid "v1.0.0" -msgstr "v1.0.0" - -#: ../../whats_new.rst:642 -msgid "" -"The changeset for this version are too big to be listed here, for more " -"information please see :ref:`the migrating page `." -msgstr "" -"このバージョンの変更は大きすぎるため、この場所に収まりきりません。詳細については :ref:`移行についてのページ " -"` を参照してください。" - -#: ../../whats_new.rst:649 -msgid "v0.16.6" -msgstr "v0.16.6" - -#: ../../whats_new.rst:654 -msgid "Fix issue with :meth:`Client.create_server` that made it stop working." -msgstr ":meth:`Client.create_server` によって動作が停止する問題を修正しました。" - -#: ../../whats_new.rst:655 -msgid "Fix main thread being blocked upon calling ``StreamPlayer.stop``." -msgstr "``StreamPlayer.stop`` の呼び出し時にメインスレッドがブロックされるのを修正しました。" - -#: ../../whats_new.rst:656 -msgid "Handle HEARTBEAT_ACK and resume gracefully when it occurs." -msgstr "HEARTBEAT_ACKを処理し、正常に再開します。" - -#: ../../whats_new.rst:657 -msgid "" -"Fix race condition when pre-emptively rate limiting that caused releasing" -" an already released lock." -msgstr "既に開放されているロックを解放しようとする原因になっていた先制的なレート制限を行っている時の競合状態を修正しました。" - -#: ../../whats_new.rst:658 -msgid "Fix invalid state errors when immediately cancelling a coroutine." -msgstr "コルーチンを直ちにキャンセルするときに無効な状態になるエラーを修正しました。" - -#: ../../whats_new.rst:663 -msgid "v0.16.1" -msgstr "v0.16.1" - -#: ../../whats_new.rst:665 -msgid "" -"This release is just a bug fix release with some better rate limit " -"implementation." -msgstr "このリリースはバグ修正であり、いくつかのレート制限の実装が改善されています。" - -#: ../../whats_new.rst:670 -msgid "Servers are now properly chunked for user bots." -msgstr "" - -#: ../../whats_new.rst:671 -msgid "The CDN URL is now used instead of the API URL for assets." -msgstr "アセットのAPI URLの代わりにCDN URLが使用されるようになりました。" - -#: ../../whats_new.rst:672 -msgid "Rate limit implementation now tries to use header information if possible." -msgstr "" - -#: ../../whats_new.rst:673 -msgid "Event loop is now properly propagated (:issue:`420`)" -msgstr "" - -#: ../../whats_new.rst:674 -msgid "" -"Allow falsey values in :meth:`Client.send_message` and " -":meth:`Client.send_file`." -msgstr "" - -#: ../../whats_new.rst:679 -msgid "v0.16.0" -msgstr "v0.16.0" - -#: ../../whats_new.rst:684 -msgid "" -"Add :attr:`Channel.overwrites` to get all the permission overwrites of a " -"channel." -msgstr "" - -#: ../../whats_new.rst:685 -msgid "Add :attr:`Server.features` to get information about partnered servers." -msgstr "" - -#: ../../whats_new.rst:690 -msgid "" -"Timeout when waiting for offline members while triggering " -":func:`on_ready`." -msgstr "" - -#: ../../whats_new.rst:692 -msgid "" -"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." -msgstr "" - -#: ../../whats_new.rst:695 -msgid "Discard null sequences in the gateway." -msgstr "" - -#: ../../whats_new.rst:697 -msgid "" -"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." -msgstr "" - -#: ../../whats_new.rst:704 -msgid "v0.15.1" -msgstr "v0.15.1" - -#: ../../whats_new.rst:706 -msgid "Fix crash on duplicate or out of order reactions." -msgstr "" - -#: ../../whats_new.rst:711 -msgid "v0.15.0" -msgstr "v0.15.0" - -#: ../../whats_new.rst:716 -msgid "Rich Embeds for messages are now supported." -msgstr "" - -#: ../../whats_new.rst:718 -msgid "" -"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`." -msgstr "" - -#: ../../whats_new.rst:719 -msgid "Add :meth:`Client.clear_reactions` to remove all reactions from a message." -msgstr "" - -#: ../../whats_new.rst:720 -msgid "" -"Add support for MESSAGE_REACTION_REMOVE_ALL event, under " -":func:`on_reaction_clear`." -msgstr "" - -#: ../../whats_new.rst:721 -msgid "" -"Add :meth:`Permissions.update` and :meth:`PermissionOverwrite.update` for" -" bulk permission updates." -msgstr "" - -#: ../../whats_new.rst:723 -msgid "" -"This allows you to use e.g. ``p.update(read_messages=True, " -"send_messages=False)`` in a single line." -msgstr "" - -#: ../../whats_new.rst:724 -msgid "" -"Add :meth:`PermissionOverwrite.is_empty` to check if the overwrite is " -"empty (i.e. has no overwrites set explicitly as true or false)." -msgstr "" - -#: ../../whats_new.rst:726 -msgid "For the command extension, the following changed:" -msgstr "コマンド拡張の場合、以下のことが変更されます。" - -#: ../../whats_new.rst:728 -msgid "``Context`` is no longer slotted to facilitate setting dynamic attributes." -msgstr "" - -#: ../../whats_new.rst:733 -msgid "v0.14.3" -msgstr "v0.14.3" - -#: ../../whats_new.rst:738 -msgid "Fix crash when dealing with MESSAGE_REACTION_REMOVE" -msgstr "MESSAGE_REACTION_REMOVEを扱う際のクラッシュを修正しました" - -#: ../../whats_new.rst:739 -msgid "Fix incorrect buckets for reactions." -msgstr "" - -#: ../../whats_new.rst:744 -msgid "v0.14.2" -msgstr "v0.14.2" - -#: ../../whats_new.rst:750 -msgid "" -":meth:`Client.wait_for_reaction` now returns a namedtuple with " -"``reaction`` and ``user`` attributes." -msgstr "" - -#: ../../whats_new.rst:750 -msgid "" -"This is for better support in the case that ``None`` is returned since " -"tuple unpacking can lead to issues." -msgstr "" - -#: ../../whats_new.rst:755 -msgid "" -"Fix bug that disallowed ``None`` to be passed for ``emoji`` parameter in " -":meth:`Client.wait_for_reaction`." -msgstr "" - -#: ../../whats_new.rst:760 -msgid "v0.14.1" -msgstr "v0.14.1" - -#: ../../whats_new.rst:763 -msgid "Bug fixes" -msgstr "バグ修正" - -#: ../../whats_new.rst:766 -msgid "Fix bug with `Reaction` not being visible at import." -msgstr "" - -#: ../../whats_new.rst:766 -msgid "This was also breaking the documentation." -msgstr "" - -#: ../../whats_new.rst:771 -msgid "v0.14.0" -msgstr "v0.14.0" - -#: ../../whats_new.rst:773 -msgid "This update adds new API features and a couple of bug fixes." -msgstr "このアップデートには、新しいAPI機能といくつかのバグ修正が含まれています。" - -#: ../../whats_new.rst:778 -msgid "" -"Add support for Manage Webhooks permission under " -":attr:`Permissions.manage_webhooks`" -msgstr "" - -#: ../../whats_new.rst:779 -msgid "Add support for ``around`` argument in 3.5+ :meth:`Client.logs_from`." -msgstr "" - -#: ../../whats_new.rst:787 -msgid "Add support for reactions." -msgstr "リアクションのサポートを追加します。" - -#: ../../whats_new.rst:781 -msgid ":meth:`Client.add_reaction` to add a reactions" -msgstr "" - -#: ../../whats_new.rst:782 -msgid ":meth:`Client.remove_reaction` to remove a reaction." -msgstr "" - -#: ../../whats_new.rst:783 -msgid "" -":meth:`Client.get_reaction_users` to get the users that reacted to a " -"message." -msgstr "" - -#: ../../whats_new.rst:784 -msgid ":attr:`Permissions.add_reactions` permission bit support." -msgstr "" - -#: ../../whats_new.rst:785 -msgid "Two new events, :func:`on_reaction_add` and :func:`on_reaction_remove`." -msgstr "" - -#: ../../whats_new.rst:786 -msgid ":attr:`Message.reactions` to get reactions from a message." -msgstr "" - -#: ../../whats_new.rst:787 -msgid ":meth:`Client.wait_for_reaction` to wait for a reaction from a user." -msgstr "" - -#: ../../whats_new.rst:792 -msgid "Fix bug with Paginator still allowing lines that are too long." -msgstr "" - -#: ../../whats_new.rst:793 -msgid "Fix the :attr:`Permissions.manage_emojis` bit being incorrect." -msgstr "" - -#: ../../whats_new.rst:798 -msgid "v0.13.0" -msgstr "v0.13.0" - -#: ../../whats_new.rst:800 -msgid "This is a backwards compatible update with new features." -msgstr "" - -#: ../../whats_new.rst:805 -msgid "Add the ability to manage emojis." -msgstr "" - -#: ../../whats_new.rst:807 -msgid ":meth:`Client.create_custom_emoji` to create new emoji." -msgstr "新しい絵文字を作成する :meth:`Client.create_custom_emoji` 。" - -#: ../../whats_new.rst:808 -msgid ":meth:`Client.edit_custom_emoji` to edit an old emoji." -msgstr "" - -#: ../../whats_new.rst:809 -msgid ":meth:`Client.delete_custom_emoji` to delete a custom emoji." -msgstr "" - -#: ../../whats_new.rst:810 -msgid "Add new :attr:`Permissions.manage_emojis` toggle." -msgstr "" - -#: ../../whats_new.rst:812 -msgid "This applies for :class:`PermissionOverwrite` as well." -msgstr "" - -#: ../../whats_new.rst:813 -msgid "Add new statuses for :class:`Status`." -msgstr "" - -#: ../../whats_new.rst:815 -msgid "" -":attr:`Status.dnd` (aliased with :attr:`Status.do_not_disturb`\\) for Do " -"Not Disturb." -msgstr "" - -#: ../../whats_new.rst:816 -msgid "" -":attr:`Status.invisible` for setting your status to invisible (please see" -" the docs for a caveat)." -msgstr "" - -#: ../../whats_new.rst:817 -msgid "Deprecate :meth:`Client.change_status`" -msgstr "" - -#: ../../whats_new.rst:819 -msgid "" -"Use :meth:`Client.change_presence` instead for better more up to date " -"functionality." -msgstr "" - -#: ../../whats_new.rst:820 -msgid "This method is subject for removal in a future API version." -msgstr "" - -#: ../../whats_new.rst:821 -msgid "" -"Add :meth:`Client.change_presence` for changing your status with the new " -"Discord API change." -msgstr "" - -#: ../../whats_new.rst:823 -msgid "" -"This is the only method that allows changing your status to invisible or " -"do not disturb." -msgstr "" - -#: ../../whats_new.rst:828 -msgid "Paginator pages do not exceed their max_size anymore (:issue:`340`)" -msgstr "" - -#: ../../whats_new.rst:829 -msgid "" -"Do Not Disturb users no longer show up offline due to the new " -":class:`Status` changes." -msgstr "" - -#: ../../whats_new.rst:834 -msgid "v0.12.0" -msgstr "v0.12.0" - -#: ../../whats_new.rst:836 -msgid "This is a bug fix update that also comes with new features." -msgstr "" - -#: ../../whats_new.rst:841 -msgid "Add custom emoji support." -msgstr "" - -#: ../../whats_new.rst:843 -msgid "Adds a new class to represent a custom Emoji named :class:`Emoji`" -msgstr "" - -#: ../../whats_new.rst:844 -msgid "Adds a utility generator function, :meth:`Client.get_all_emojis`." -msgstr "" - -#: ../../whats_new.rst:845 -msgid "Adds a list of emojis on a server, :attr:`Server.emojis`." -msgstr "" - -#: ../../whats_new.rst:846 -msgid "Adds a new event, :func:`on_server_emojis_update`." -msgstr "" - -#: ../../whats_new.rst:847 -msgid "Add new server regions to :class:`ServerRegion`" -msgstr "" - -#: ../../whats_new.rst:849 -msgid ":attr:`ServerRegion.eu_central` and :attr:`ServerRegion.eu_west`." -msgstr "" - -#: ../../whats_new.rst:850 -msgid "" -"Add support for new pinned system message under " -":attr:`MessageType.pins_add`." -msgstr "" - -#: ../../whats_new.rst:851 -msgid "" -"Add order comparisons for :class:`Role` to allow it to be compared with " -"regards to hierarchy." -msgstr "" - -#: ../../whats_new.rst:853 -msgid "" -"This means that you can now do ``role_a > role_b`` etc to check if " -"``role_b`` is lower in the hierarchy." -msgstr "" - -#: ../../whats_new.rst:855 -msgid "Add :attr:`Server.role_hierarchy` to get the server's role hierarchy." -msgstr "" - -#: ../../whats_new.rst:856 -msgid "" -"Add :attr:`Member.server_permissions` to get a member's server " -"permissions without their channel specific overwrites." -msgstr "" - -#: ../../whats_new.rst:857 -msgid "Add :meth:`Client.get_user_info` to retrieve a user's info from their ID." -msgstr "" - -#: ../../whats_new.rst:858 -msgid "" -"Add a new ``Player`` property, ``Player.error`` to fetch the error that " -"stopped the player." -msgstr "" - -#: ../../whats_new.rst:860 -msgid "" -"To help with this change, a player's ``after`` function can now take a " -"single parameter denoting the current player." -msgstr "" - -#: ../../whats_new.rst:861 -msgid "Add support for server verification levels." -msgstr "" - -#: ../../whats_new.rst:863 -msgid "Adds a new enum called :class:`VerificationLevel`." -msgstr "" - -#: ../../whats_new.rst:864 -msgid "" -"This enum can be used in :meth:`Client.edit_server` under the " -"``verification_level`` keyword argument." -msgstr "" - -#: ../../whats_new.rst:865 -msgid "Adds a new attribute in the server, :attr:`Server.verification_level`." -msgstr "" - -#: ../../whats_new.rst:866 -msgid "" -"Add :attr:`Server.voice_client` shortcut property for " -":meth:`Client.voice_client_in`." -msgstr "" - -#: ../../whats_new.rst:868 -msgid "" -"This is technically old (was added in v0.10.0) but was undocumented until" -" v0.12.0." -msgstr "" - -#: ../../whats_new.rst:870 ../../whats_new.rst:916 -msgid "For the command extension, the following are new:" -msgstr "" - -#: ../../whats_new.rst:872 -msgid "Add custom emoji converter." -msgstr "" - -#: ../../whats_new.rst:873 -msgid "All default converters that can take IDs can now convert via ID." -msgstr "" - -#: ../../whats_new.rst:874 -msgid "Add coroutine support for ``Bot.command_prefix``." -msgstr "" - -#: ../../whats_new.rst:875 -msgid "Add a method to reset command cooldown." -msgstr "" - -#: ../../whats_new.rst:880 -msgid "" -"Fix bug that caused the library to not work with the latest " -"``websockets`` library." -msgstr "" - -#: ../../whats_new.rst:881 -msgid "Fix bug that leaked keep alive threads (:issue:`309`)" -msgstr "" - -#: ../../whats_new.rst:882 -msgid "" -"Fix bug that disallowed :class:`ServerRegion` from being used in " -":meth:`Client.edit_server`." -msgstr "" - -#: ../../whats_new.rst:883 -msgid "" -"Fix bug in :meth:`Channel.permissions_for` that caused permission " -"resolution to happen out of order." -msgstr "" - -#: ../../whats_new.rst:884 -msgid "" -"Fix bug in :attr:`Member.top_role` that did not account for same-position" -" roles." -msgstr "" - -#: ../../whats_new.rst:889 -msgid "v0.11.0" -msgstr "v0.11.0" - -#: ../../whats_new.rst:891 -msgid "" -"This is a minor bug fix update that comes with a gateway update (v5 -> " -"v6)." -msgstr "" - -#: ../../whats_new.rst:894 -msgid "Breaking Changes" -msgstr "破壊的変更" - -#: ../../whats_new.rst:896 -msgid "" -"``Permissions.change_nicknames`` has been renamed to " -":attr:`Permissions.change_nickname` to match the UI." -msgstr "" - -#: ../../whats_new.rst:901 -msgid "Add the ability to prune members via :meth:`Client.prune_members`." -msgstr "" - -#: ../../whats_new.rst:902 -msgid "" -"Switch the websocket gateway version to v6 from v5. This allows the " -"library to work with group DMs and 1-on-1 calls." -msgstr "" - -#: ../../whats_new.rst:903 -msgid "Add :attr:`AppInfo.owner` attribute." -msgstr "" - -#: ../../whats_new.rst:904 -msgid "Add :class:`CallMessage` for group voice call messages." -msgstr "" - -#: ../../whats_new.rst:905 -msgid "Add :class:`GroupCall` for group voice call information." -msgstr "" - -#: ../../whats_new.rst:906 -msgid "Add :attr:`Message.system_content` to get the system message." -msgstr "" - -#: ../../whats_new.rst:907 -msgid "" -"Add the remaining VIP servers and the Brazil servers into " -":class:`ServerRegion` enum." -msgstr "" - -#: ../../whats_new.rst:908 -msgid "" -"Add ``stderr`` argument to :meth:`VoiceClient.create_ffmpeg_player` to " -"redirect stderr." -msgstr "" - -#: ../../whats_new.rst:909 -msgid "" -"The library now handles implicit permission resolution in " -":meth:`Channel.permissions_for`." -msgstr "" - -#: ../../whats_new.rst:910 -msgid "Add :attr:`Server.mfa_level` to query a server's 2FA requirement." -msgstr "" - -#: ../../whats_new.rst:911 -msgid "Add :attr:`Permissions.external_emojis` permission." -msgstr "" - -#: ../../whats_new.rst:912 -msgid "Add :attr:`Member.voice` attribute that refers to a :class:`VoiceState`." -msgstr "" - -#: ../../whats_new.rst:914 -msgid "" -"For backwards compatibility, the member object will have properties " -"mirroring the old behaviour." -msgstr "" - -#: ../../whats_new.rst:918 -msgid "Command cooldown system with the ``cooldown`` decorator." -msgstr "" - -#: ../../whats_new.rst:919 -msgid "" -"``UserInputError`` exception for the hierarchy for user input related " -"errors." -msgstr "" - -#: ../../whats_new.rst:924 -msgid ":attr:`Client.email` is now saved when using a token for user accounts." -msgstr "" - -#: ../../whats_new.rst:925 -msgid "Fix issue when removing roles out of order." -msgstr "" - -#: ../../whats_new.rst:926 -msgid "Fix bug where discriminators would not update." -msgstr "" - -#: ../../whats_new.rst:927 -msgid "" -"Handle cases where ``HEARTBEAT`` opcode is received. This caused bots to " -"disconnect seemingly randomly." -msgstr "" - -#: ../../whats_new.rst:929 -msgid "For the command extension, the following bug fixes apply:" -msgstr "" - -#: ../../whats_new.rst:931 -msgid "``Bot.check`` decorator is actually a decorator not requiring parentheses." -msgstr "" - -#: ../../whats_new.rst:932 -msgid "" -"``Bot.remove_command`` and ``Group.remove_command`` no longer throw if " -"the command doesn't exist." -msgstr "" - -#: ../../whats_new.rst:933 -msgid "Command names are no longer forced to be ``lower()``." -msgstr "" - -#: ../../whats_new.rst:934 -msgid "" -"Fix a bug where Member and User converters failed to work in private " -"message contexts." -msgstr "" - -#: ../../whats_new.rst:935 -msgid "" -"``HelpFormatter`` now ignores hidden commands when deciding the maximum " -"width." -msgstr "" - -#: ../../whats_new.rst:940 -msgid "v0.10.0" -msgstr "v0.10.0" - -#: ../../whats_new.rst:942 -msgid "" -"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." -msgstr "" - -#: ../../whats_new.rst:947 -msgid "" -"The library is now fully ``asyncio`` compatible, allowing you to write " -"non-blocking code a lot more easily." -msgstr "" - -#: ../../whats_new.rst:948 -msgid "The library now fully handles 429s and unconditionally retries on 502s." -msgstr "" - -#: ../../whats_new.rst:949 -msgid "" -"A new command extension module was added but is currently undocumented. " -"Figuring it out is left as an exercise to the reader." -msgstr "" - -#: ../../whats_new.rst:950 -msgid "" -"Two new exception types, :exc:`Forbidden` and :exc:`NotFound` to denote " -"permission errors or 404 errors." -msgstr "" - -#: ../../whats_new.rst:951 -msgid "Added :meth:`Client.delete_invite` to revoke invites." -msgstr "" - -#: ../../whats_new.rst:952 -msgid "" -"Added support for sending voice. Check :class:`VoiceClient` for more " -"details." -msgstr "" - -#: ../../whats_new.rst:953 -msgid "" -"Added :meth:`Client.wait_for_message` coroutine to aid with follow up " -"commands." -msgstr "" - -#: ../../whats_new.rst:954 -msgid "" -"Added :data:`version_info` named tuple to check version info of the " -"library." -msgstr "" - -#: ../../whats_new.rst:955 -msgid "" -"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`." -msgstr "" - -#: ../../whats_new.rst:957 -msgid "" -"New utility function, :func:`discord.utils.get` to simplify retrieval of " -"items based on attributes." -msgstr "" - -#: ../../whats_new.rst:958 -msgid "" -"All data classes now support ``!=``, ``==``, ``hash(obj)`` and " -"``str(obj)``." -msgstr "" - -#: ../../whats_new.rst:959 -msgid "Added :meth:`Client.get_bans` to get banned members from a server." -msgstr "" - -#: ../../whats_new.rst:960 -msgid "" -"Added :meth:`Client.invites_from` to get currently active invites in a " -"server." -msgstr "" - -#: ../../whats_new.rst:961 -msgid "" -"Added :attr:`Server.me` attribute to get the :class:`Member` version of " -":attr:`Client.user`." -msgstr "" - -#: ../../whats_new.rst:962 -msgid "" -"Most data classes now support a ``hash(obj)`` function to allow you to " -"use them in ``set`` or ``dict`` classes or subclasses." -msgstr "" - -#: ../../whats_new.rst:963 -msgid "" -"Add :meth:`Message.clean_content` to get a text version of the content " -"with the user and channel mentioned changed into their names." -msgstr "" - -#: ../../whats_new.rst:964 -msgid "" -"Added a way to remove the messages of the user that just got banned in " -":meth:`Client.ban`." -msgstr "" - -#: ../../whats_new.rst:965 -msgid "" -"Added :meth:`Client.wait_until_ready` to facilitate easy creation of " -"tasks that require the client cache to be ready." -msgstr "" - -#: ../../whats_new.rst:966 -msgid "" -"Added :meth:`Client.wait_until_login` to facilitate easy creation of " -"tasks that require the client to be logged in." -msgstr "" - -#: ../../whats_new.rst:967 -msgid "" -"Add :class:`discord.Game` to represent any game with custom text to send " -"to :meth:`Client.change_status`." -msgstr "" - -#: ../../whats_new.rst:968 -msgid "Add :attr:`Message.nonce` attribute." -msgstr "" - -#: ../../whats_new.rst:969 -msgid "" -"Add :meth:`Member.permissions_in` as another way of doing " -":meth:`Channel.permissions_for`." -msgstr "" - -#: ../../whats_new.rst:970 -msgid "Add :meth:`Client.move_member` to move a member to another voice channel." -msgstr "" - -#: ../../whats_new.rst:971 -msgid "You can now create a server via :meth:`Client.create_server`." -msgstr "" - -#: ../../whats_new.rst:972 -msgid "Added :meth:`Client.edit_server` to edit existing servers." -msgstr "" - -#: ../../whats_new.rst:973 -msgid "" -"Added :meth:`Client.server_voice_state` to server mute or server deafen a" -" member." -msgstr "" - -#: ../../whats_new.rst:974 -msgid "If you are being rate limited, the library will now handle it for you." -msgstr "" - -#: ../../whats_new.rst:975 -msgid "" -"Add :func:`on_member_ban` and :func:`on_member_unban` events that trigger" -" when a member is banned/unbanned." -msgstr "" - -#: ../../whats_new.rst:978 -msgid "Performance Improvements" -msgstr "" - -#: ../../whats_new.rst:980 -msgid "" -"All data classes now use ``__slots__`` which greatly reduce the memory " -"usage of things kept in cache." -msgstr "" - -#: ../../whats_new.rst:981 -msgid "" -"Due to the usage of ``asyncio``, the CPU usage of the library has gone " -"down significantly." -msgstr "" - -#: ../../whats_new.rst:982 -msgid "" -"A lot of the internal cache lists were changed into dictionaries to " -"change the ``O(n)`` lookup into ``O(1)``." -msgstr "" - -#: ../../whats_new.rst:983 -msgid "" -"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." -msgstr "" - -#: ../../whats_new.rst:985 -msgid "" -"While minor, change regex from ``\\d+`` to ``[0-9]+`` to avoid " -"unnecessary unicode character lookups." -msgstr "" - -#: ../../whats_new.rst:990 -msgid "Fix bug where guilds being updated did not edit the items in cache." -msgstr "" - -#: ../../whats_new.rst:991 -msgid "" -"Fix bug where ``member.roles`` were empty upon joining instead of having " -"the ``@everyone`` role." -msgstr "" - -#: ../../whats_new.rst:992 -msgid "" -"Fix bug where :meth:`Role.is_everyone` was not being set properly when " -"the role was being edited." -msgstr "" - -#: ../../whats_new.rst:993 -msgid "" -":meth:`Client.logs_from` now handles cases where limit > 100 to sidestep " -"the discord API limitation." -msgstr "" - -#: ../../whats_new.rst:994 -msgid "Fix bug where a role being deleted would trigger a ``ValueError``." -msgstr "" - -#: ../../whats_new.rst:995 -msgid "" -"Fix bug where :meth:`Permissions.kick_members` and " -":meth:`Permissions.ban_members` were flipped." -msgstr "" - -#: ../../whats_new.rst:996 -msgid "" -"Mentions are now triggered normally. This was changed due to the way " -"discord handles it internally." -msgstr "" - -#: ../../whats_new.rst:997 -msgid "" -"Fix issue when a :class:`Message` would attempt to upgrade a " -":attr:`Message.server` when the channel is a :class:`Object`." -msgstr "" - -#: ../../whats_new.rst:999 -msgid "" -"Unavailable servers were not being added into cache, this has been " -"corrected." -msgstr "" - diff --git a/docs/whats_new.rst b/docs/whats_new.rst index d9b3e836..bdbf1d75 100644 --- a/docs/whats_new.rst +++ b/docs/whats_new.rst @@ -11,6 +11,134 @@ Changelog This page keeps a detailed human friendly rendering of what's new and changed in specific versions. +.. _vp2p0p0: + +v2.0.0 +-------- + +This version was partly developed by Danny, and partly by the enhanced-discord.py contributors. +The library has been updated with breaking changes, and as such the major version was changed. + + +- Performance of the library has improved significantly (all times with 1 process and 1 AutoShardedBot): + - 735 guilds boot up time (with chunking): 57s/1.7 GiB RAM -> 42s/1.4 GiB RAM + - 27k guilds boot up time (with chunking): 477s/8 GiB RAM -> 303s/7.2 GiB RAM + - 48k guilds boot up time (without chunking): 109s -> 67s + - 106k guilds boot up time (without chunking): 3300s -> 3090s +- The entire public API of the library is now completely type hinted. + - There may still be bugs however. + - For best type hinting experience consider using Pyright. +- Almost all edit methods now return their updated counterpart rather than doing an in-place edit. +- Japanese docs were removed, as we are no longer able to keep them in sync. + + +Breaking Changes +~~~~~~~~~~~~~~~~~ + +- :meth:`Asset.replace` now only accepts keyword arguments +- ``Asset.with_`` functions now only accept positional only arguments +- :meth:`TextChannel.get_partial_message` is now pos-only +- :meth:`TextChannel.get_thread` is now pos-only +- ``permissions_for`` is now pos-only +- :attr:`GroupChannel.owner` is now Optional +- ``edit`` methods now only accept None if it actually means something (e.g. clearing it) +- ``timeout`` parameter for ``ui.View.__init__`` is now keyword only +- When an interaction has already been responded and another one is sent, :exc:`InteractionResponded`is now raised. + - Discord's API only allows a single :attr:`interaction.response`. +- Separate :func:`on_member_update` and :func:`on_presence_update` + - The new event :func:`on_presence_update` is now called when status/activity is changed. + - :func:`on_member_update` will now no longer have status/activity changes. +- afk parameter in :meth:`Client.change_presence` is removed +- The undocumented private :func:`on_socket_response` event got removed. + - Consider using the newer documented :func:`on_socket_event_type` event instead. +- Using :func:`on_socket_raw_receive` and :func:`on_socket_raw_send` are now opt-in via :attr:`enable_debug_events` toggle. +- :func:`on_socket_raw_receive` is now only dispatched after decompressing the payload. +- Persistent View dispatch mechanism now uses the ``message_id`` key if provided. +- :meth:`Message.start_thread` was renamed to :meth:`Message.create_thread` +- :meth:`TextChannel.start_thread` was renamed to :meth:`TextChannel.create_thread` +- All ``get_`` lookup functions now use positional-only parameters for the id parameter. +- Remove :meth:`TextChannel.active_threads` due to the endpoint being deprecated and slated for removal. + - Use :meth:`Guild.active_threads` instead. +- :attr:`User.avatar` now returns None if the user did not upload an avatar. + - Use :attr:`User.display_avatar` to get the avatar and fallback to the default avatar to go back to the old behaviour. + +New Features +~~~~~~~~~~~~~~ + +- Channel types are now typed +- Member is now typed +- Client is now typed +- Permissions are now typed +- Core library errors are now typed +- Add various examples showing how to use views. There are more to come. +- :attr:`GroupChannel.owner_id` now gets the owner ID +- ``edit`` methods now don't rely on previous state +- :meth:`View.from_message` converts a Message.components to a View +- :attr:`Thread.type` to get the thread channel type +- :attr:`ButtonStyle.url` alias for :attr:`ButtonStyle.link` +- Add default style for :class:`ui.Button` constructor + - This makes it so creating a URL button is as simple as ``ui.Button(url='...', label='...')`` +- :attr:`Thread.mention` to get the mention string for a thread +- :meth:`Thread.is_nsfw` to check whether the parent channel of the thread is NSFW +- Add support for fetching the original interaction response message. + - :meth:`Interaction.original_message` will retrieve it and returns an InteractionMessage + - :meth:`InteractionMessage.edit` or :meth:`Interaction.edit_original_message` will edit it + - :meth:`InteractionMessage.delete` or :meth:`Interaction.delete_original_message` will delete it +- :attr:`MessageFlags.ephemeral` to get whether a message is ephemeral +- :meth:`Client.fetch_channel` now fetches threads as well +- :class:`SelectOption` now has a __str__ that matches the client representation. + - This might change in the future to remove the description from it. +- Add a converter for :class:`discord.Thread` +- Allow ``clean_content`` converter to work stand-alone +- Add :meth:`User.banner` to get a user's banner and :meth:`User.accent_colour` to get the set banner colour. + - Due to an API limitation this requires using :meth:`Client.fetch_user`. +- Add ``reason`` keyword argument to more methods +- Add audit log events for threads +- Allow public threads to be created without a starter message +- Add :meth:`Guild.get_channel_or_thread` helper method +- Add full support for the new sticker API +- Add :func:`on_socket_event_type` event to get the event type of an event +- Add :attr:`TextChannel.default_auto_archive_duration` +- Add :class:`PartialMessageable` type to allow for sending messages to a channel using only its ``channel_id``. + - This is constructed with :meth:`Client.get_partial_messageable`. +- Add :meth:`Guild.active_threads` to get all of a guild's active threads. +- Add :attr:`Thread.members` to get all cached :class:`ThreadMember` instances of a thread. +- Add :meth:`Thread.fetch_members` to fetch all :class:`ThreadMember` instances of a thread. + - These two require :attr:`Intents.members` to be useful. +- Add support for guild avatars for members under :attr:`Member.guild_avatar` +- Add :attr:`User.display_avatar` and :attr:`Member.display_avatar` to get the user's displayed avatar. +- Add :attr:`Colour.brand_green` and :attr:`Colour.brand_red` +- |commands| :attr:`CommandOnCooldown.type` to get back the type of the cooldown since it was removed from :class:`Cooldown` +- Add :attr:`Guild.bots` and :attr:`Guild.humans` + + +Bug Fixes +~~~~~~~~~~~ + +- :class:`Channel` converters now work in DMs again +- Fix :attr:`Interaction.channel` being None in threads +- Change timeouts in :class:`ui.View` to work as documented +- :attr:`Message.__repr__` now shows the proper type, e.g. :class:`WebhookMessage` and :class:`InteractionMessage` +- Change :class:`Cooldown` handling to not reset token window when the number of tokens reaches 0 +- Fix audit log permission construction breaking due to unexpected type errors. +- Fix :func:`on_thread_join` not dispatching when a thread is unarchived +- Fix :attr:`Message.guild` being None when a thread is unarchived due to a new message +- :class:`MessageConverter` now works with threads +- Retry requests when a 504 is hit +- Fix :attr:`Thread.slowmode_delay` not updating on edit +- Fix ``permissions_for`` for roles +- Update :attr:`Message.system_content` for newer message types +- Fix :class:`PartialMessage` not working with threads +- Fix crash with stage instances not having the documented ``discoverable_enabled`` key +- Fix some built-in checks not working with threads +- Fix :class:`SyncWebhook` not working in a multi-threaded context +- Fix :func:`on_thread_member_remove` not dispatching properly +- Fix :func:`on_typing` not dispatching for threads +- Update :attr:`Message.is_system` to work with newer message types +- Fix some enums like :class:`VerificationLevel` not being comparable. +- Fix ``io.BytesIO`` sources not working with ffmpeg players +- Fix :meth:`Client.fetch_channel` and :meth:`Guild.fetch_channel` not returning threads + .. _vp1p7p3: v1.7.3 diff --git a/examples/background_task.py b/examples/background_task.py index 77ca885a..bf68d880 100644 --- a/examples/background_task.py +++ b/examples/background_task.py @@ -26,5 +26,5 @@ class MyClient(discord.Client): async def before_my_task(self): await self.wait_until_ready() # wait until the bot logs in -client = MyClient() +client = MyClient(intents=discord.Intents(guilds=True)) client.run('token') diff --git a/examples/background_task_asyncio.py b/examples/background_task_asyncio.py index be445e91..c203afba 100644 --- a/examples/background_task_asyncio.py +++ b/examples/background_task_asyncio.py @@ -22,5 +22,5 @@ class MyClient(discord.Client): await asyncio.sleep(60) # task runs every 60 seconds -client = MyClient() +client = MyClient(intents=discord.Intents(guilds=True)) client.run('token') diff --git a/examples/basic_bot.py b/examples/basic_bot.py index d350401e..805a76d3 100644 --- a/examples/basic_bot.py +++ b/examples/basic_bot.py @@ -9,10 +9,8 @@ module. There are a number of utility commands being showcased here.''' -intents = discord.Intents.default() -intents.members = True - -bot = commands.Bot(command_prefix='?', description=description, intents=intents) +intents = discord.Intents(guilds=True, messages=True, members=True) +bot = commands.Bot(command_prefix='t-', description=description, intents=intents) @bot.event async def on_ready(): diff --git a/examples/basic_voice.py b/examples/basic_voice.py index 9f47c77a..8de120c8 100644 --- a/examples/basic_voice.py +++ b/examples/basic_voice.py @@ -123,8 +123,11 @@ class Music(commands.Cog): elif ctx.voice_client.is_playing(): ctx.voice_client.stop() -bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"), - description='Relatively simple music bot example') +bot = commands.Bot( + command_prefix=commands.when_mentioned_or("!"), + description='Relatively simple music bot example', + intents=discord.Intents(guilds=True, guild_messages=True, voice_states=True) +) @bot.event async def on_ready(): diff --git a/examples/converters.py b/examples/converters.py index 9bd8ae06..54539201 100644 --- a/examples/converters.py +++ b/examples/converters.py @@ -5,9 +5,8 @@ import typing import discord from discord.ext import commands -intents = discord.Intents.default() -intents.members = True +intents = discord.Intents(guilds=True, messages=True, members=True) bot = commands.Bot('!', intents=intents) diff --git a/examples/custom_context.py b/examples/custom_context.py index d3a5b94b..2c5d6630 100644 --- a/examples/custom_context.py +++ b/examples/custom_context.py @@ -29,7 +29,7 @@ class MyBot(commands.Bot): return await super().get_context(message, cls=cls) -bot = MyBot(command_prefix='!') +bot = MyBot(command_prefix='!', intents=discord.Intents(guilds=True, messages=True)) @bot.command() async def guess(ctx, number: int): diff --git a/examples/deleted.py b/examples/deleted.py index 6e0c203d..07863d25 100644 --- a/examples/deleted.py +++ b/examples/deleted.py @@ -17,5 +17,5 @@ class MyClient(discord.Client): msg = f'{message.author} has deleted the message: {message.content}' await message.channel.send(msg) -client = MyClient() +client = MyClient(intents=discord.Intents(guilds=True, messages=True)) client.run('token') diff --git a/examples/edits.py b/examples/edits.py index 36786046..de03a157 100644 --- a/examples/edits.py +++ b/examples/edits.py @@ -16,5 +16,5 @@ class MyClient(discord.Client): msg = f'**{before.author}** edited their message:\n{before.content} -> {after.content}' await before.channel.send(msg) -client = MyClient() +client = MyClient(intents=discord.Intents(guilds=True, messages=True)) client.run('token') diff --git a/examples/guessing_game.py b/examples/guessing_game.py index c96a18e3..f8ad4a1e 100644 --- a/examples/guessing_game.py +++ b/examples/guessing_game.py @@ -30,5 +30,5 @@ class MyClient(discord.Client): else: await message.channel.send(f'Oops. It is actually {answer}.') -client = MyClient() +client = MyClient(intents=discord.Intents(guilds=True, messages=True)) client.run('token') diff --git a/examples/new_member.py b/examples/new_member.py index 7081639b..d35d98f2 100644 --- a/examples/new_member.py +++ b/examples/new_member.py @@ -14,8 +14,5 @@ class MyClient(discord.Client): await guild.system_channel.send(to_send) -intents = discord.Intents.default() -intents.members = True - -client = MyClient(intents=intents) +client = MyClient(intents=discord.Intents(guilds=True, members=True)) client.run('token') diff --git a/examples/reaction_roles.py b/examples/reaction_roles.py index b58e7f74..d213f46b 100644 --- a/examples/reaction_roles.py +++ b/examples/reaction_roles.py @@ -78,8 +78,6 @@ class MyClient(discord.Client): # If we want to do something in case of errors we'd do it here. pass -intents = discord.Intents.default() -intents.members = True - +intents = discord.Intents(guilds=True, members=True, guild_reactions=True) client = MyClient(intents=intents) client.run('token') diff --git a/examples/reply.py b/examples/reply.py index b35ac669..c57c47a5 100644 --- a/examples/reply.py +++ b/examples/reply.py @@ -13,5 +13,5 @@ class MyClient(discord.Client): if message.content.startswith('!hello'): await message.reply('Hello!', mention_author=True) -client = MyClient() +client = MyClient(intents=discord.Intents(guilds=True, messages=True)) client.run('token') diff --git a/examples/secret.py b/examples/secret.py index 9246c68f..2ad2471f 100644 --- a/examples/secret.py +++ b/examples/secret.py @@ -3,7 +3,11 @@ import typing import discord from discord.ext import commands -bot = commands.Bot(command_prefix=commands.when_mentioned, description="Nothing to see here!") +bot = commands.Bot( + command_prefix=commands.when_mentioned, + description="Nothing to see here!", + intents=discord.Intents(guilds=True, messages=True) +) # the `hidden` keyword argument hides it from the help command. @bot.group(hidden=True) diff --git a/examples/views/confirm.py b/examples/views/confirm.py index 6ec81369..a22876b4 100644 --- a/examples/views/confirm.py +++ b/examples/views/confirm.py @@ -5,7 +5,10 @@ import discord class Bot(commands.Bot): def __init__(self): - super().__init__(command_prefix=commands.when_mentioned_or('$')) + super().__init__( + command_prefix=commands.when_mentioned_or('$'), + intents=discord.Intents(guilds=True, messages=True) + ) async def on_ready(self): print(f'Logged in as {self.user} (ID: {self.user.id})') diff --git a/examples/views/counter.py b/examples/views/counter.py index a1ab756a..799bb7ea 100644 --- a/examples/views/counter.py +++ b/examples/views/counter.py @@ -5,7 +5,10 @@ import discord class CounterBot(commands.Bot): def __init__(self): - super().__init__(command_prefix=commands.when_mentioned_or('$')) + super().__init__( + command_prefix=commands.when_mentioned_or('$'), + intents=discord.Intents(guilds=True, messages=True) + ) async def on_ready(self): print(f'Logged in as {self.user} (ID: {self.user.id})') diff --git a/examples/views/dropdown.py b/examples/views/dropdown.py new file mode 100644 index 00000000..993f4d03 --- /dev/null +++ b/examples/views/dropdown.py @@ -0,0 +1,64 @@ +import discord +from discord.ext import commands + +# Defines a custom Select containing colour options +# that the user can choose. The callback function +# of this class is called when the user changes their choice +class Dropdown(discord.ui.Select): + def __init__(self): + + # Set the options that will be presented inside the dropdown + options = [ + discord.SelectOption(label='Red', description='Your favourite colour is red', emoji='🟥'), + discord.SelectOption(label='Green', description='Your favourite colour is green', emoji='🟩'), + discord.SelectOption(label='Blue', description='Your favourite colour is blue', emoji='🟦') + ] + + # The placeholder is what will be shown when no option is chosen + # The min and max values indicate we can only pick one of the three options + # The options parameter defines the dropdown options. We defined this above + super().__init__(placeholder='Choose your favourite colour...', min_values=1, max_values=1, options=options) + + async def callback(self, interaction: discord.Interaction): + # Use the interaction object to send a response message containing + # the user's favourite colour or choice. The self object refers to the + # Select object, and the values attribute gets a list of the user's + # selected options. We only want the first one. + await interaction.response.send_message(f'Your favourite colour is {self.values[0]}') + + +class DropdownView(discord.ui.View): + def __init__(self): + super().__init__() + + # Adds the dropdown to our view object. + self.add_item(Dropdown()) + + +class Bot(commands.Bot): + def __init__(self): + super().__init__( + command_prefix=commands.when_mentioned_or('$'), + intents=discord.Intents(guilds=True, messages=True) + ) + + async def on_ready(self): + print(f'Logged in as {self.user} (ID: {self.user.id})') + print('------') + + +bot = Bot() + + +@bot.command() +async def colour(ctx): + """Sends a message with our dropdown containing colours""" + + # Create the view containing our dropdown + view = DropdownView() + + # Sending a message containing our view + await ctx.send('Pick your favourite colour:', view=view) + + +bot.run('token') diff --git a/examples/views/ephemeral.py b/examples/views/ephemeral.py index 770d4b65..85f57074 100644 --- a/examples/views/ephemeral.py +++ b/examples/views/ephemeral.py @@ -4,7 +4,10 @@ import discord class EphemeralCounterBot(commands.Bot): def __init__(self): - super().__init__(command_prefix=commands.when_mentioned_or('$')) + super().__init__( + command_prefix=commands.when_mentioned_or('$'), + intents=discord.Intents(guilds=True, messages=True) + ) async def on_ready(self): print(f'Logged in as {self.user} (ID: {self.user.id})') diff --git a/examples/views/link.py b/examples/views/link.py index 2516d538..ec000907 100644 --- a/examples/views/link.py +++ b/examples/views/link.py @@ -5,7 +5,10 @@ from urllib.parse import quote_plus class GoogleBot(commands.Bot): def __init__(self): - super().__init__(command_prefix=commands.when_mentioned_or('$')) + super().__init__( + command_prefix=commands.when_mentioned_or('$'), + intents=discord.Intents(guilds=True, messages=True) + ) async def on_ready(self): print(f'Logged in as {self.user} (ID: {self.user.id})') @@ -36,4 +39,4 @@ async def google(ctx: commands.Context, *, query: str): await ctx.send(f'Google Result for: `{query}`', view=Google(query)) -bot.run('token') +bot.run() diff --git a/examples/views/persistent.py b/examples/views/persistent.py index 71747667..261e0679 100644 --- a/examples/views/persistent.py +++ b/examples/views/persistent.py @@ -29,7 +29,11 @@ class PersistentView(discord.ui.View): class PersistentViewBot(commands.Bot): def __init__(self): - super().__init__(command_prefix=commands.when_mentioned_or('$')) + super().__init__( + command_prefix=commands.when_mentioned_or('$'), + intents=discord.Intents(guilds=True, messages=True) + ) + self.persistent_views_added = False async def on_ready(self): diff --git a/examples/views/tic_tac_toe.py b/examples/views/tic_tac_toe.py index 81632e26..c3665073 100644 --- a/examples/views/tic_tac_toe.py +++ b/examples/views/tic_tac_toe.py @@ -120,7 +120,10 @@ class TicTacToe(discord.ui.View): class TicTacToeBot(commands.Bot): def __init__(self): - super().__init__(command_prefix=commands.when_mentioned_or('$')) + super().__init__( + command_prefix=commands.when_mentioned_or('$'), + intents=discord.Intents(guilds=True, messages=True) + ) async def on_ready(self): print(f'Logged in as {self.user} (ID: {self.user.id})') diff --git a/setup.py b/setup.py index 251241b4..9ffd24ce 100644 --- a/setup.py +++ b/setup.py @@ -83,5 +83,6 @@ setup(name='discord.py', 'Topic :: Software Development :: Libraries', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Utilities', + 'Typing :: Typed', ] )