mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-06-08 04:38:42 +00:00
Change auto_locale_strings default to True
This commit is contained in:
parent
e16c0b02ac
commit
cc0c261925
@ -483,7 +483,7 @@ class Command(Generic[GroupT, P, T]):
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
nsfw: :class:`bool`
|
nsfw: :class:`bool`
|
||||||
Whether the command is NSFW and should only work in NSFW channels.
|
Whether the command is NSFW and should only work in NSFW channels.
|
||||||
Defaults to ``False``.
|
Defaults to ``False``.
|
||||||
@ -539,7 +539,7 @@ class Command(Generic[GroupT, P, T]):
|
|||||||
nsfw: bool = False,
|
nsfw: bool = False,
|
||||||
parent: Optional[Group] = None,
|
parent: Optional[Group] = None,
|
||||||
guild_ids: Optional[List[int]] = None,
|
guild_ids: Optional[List[int]] = None,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
):
|
):
|
||||||
name, locale = (name.message, name) if isinstance(name, locale_str) else (name, None)
|
name, locale = (name.message, name) if isinstance(name, locale_str) else (name, None)
|
||||||
@ -1015,7 +1015,7 @@ class ContextMenu:
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
nsfw: :class:`bool`
|
nsfw: :class:`bool`
|
||||||
Whether the command is NSFW and should only work in NSFW channels.
|
Whether the command is NSFW and should only work in NSFW channels.
|
||||||
Defaults to ``False``.
|
Defaults to ``False``.
|
||||||
@ -1060,7 +1060,7 @@ class ContextMenu:
|
|||||||
type: AppCommandType = MISSING,
|
type: AppCommandType = MISSING,
|
||||||
nsfw: bool = False,
|
nsfw: bool = False,
|
||||||
guild_ids: Optional[List[int]] = None,
|
guild_ids: Optional[List[int]] = None,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
):
|
):
|
||||||
name, locale = (name.message, name) if isinstance(name, locale_str) else (name, None)
|
name, locale = (name.message, name) if isinstance(name, locale_str) else (name, None)
|
||||||
@ -1233,7 +1233,7 @@ class Group:
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
default_permissions: Optional[:class:`~discord.Permissions`]
|
default_permissions: Optional[:class:`~discord.Permissions`]
|
||||||
The default permissions that can execute this group on Discord. Note
|
The default permissions that can execute this group on Discord. Note
|
||||||
that server administrators can override this value in the client.
|
that server administrators can override this value in the client.
|
||||||
@ -1363,7 +1363,7 @@ class Group:
|
|||||||
guild_ids: Optional[List[int]] = None,
|
guild_ids: Optional[List[int]] = None,
|
||||||
guild_only: bool = MISSING,
|
guild_only: bool = MISSING,
|
||||||
nsfw: bool = MISSING,
|
nsfw: bool = MISSING,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
default_permissions: Optional[Permissions] = MISSING,
|
default_permissions: Optional[Permissions] = MISSING,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
):
|
):
|
||||||
@ -1752,7 +1752,7 @@ class Group:
|
|||||||
name: Union[str, locale_str] = MISSING,
|
name: Union[str, locale_str] = MISSING,
|
||||||
description: Union[str, locale_str] = MISSING,
|
description: Union[str, locale_str] = MISSING,
|
||||||
nsfw: bool = False,
|
nsfw: bool = False,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:
|
) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:
|
||||||
"""Creates an application command under this group.
|
"""Creates an application command under this group.
|
||||||
@ -1773,7 +1773,7 @@ class Group:
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
extras: :class:`dict`
|
extras: :class:`dict`
|
||||||
A dictionary that can be used to store extraneous data.
|
A dictionary that can be used to store extraneous data.
|
||||||
The library will not touch any values or keys within this dictionary.
|
The library will not touch any values or keys within this dictionary.
|
||||||
@ -1811,7 +1811,7 @@ def command(
|
|||||||
name: Union[str, locale_str] = MISSING,
|
name: Union[str, locale_str] = MISSING,
|
||||||
description: Union[str, locale_str] = MISSING,
|
description: Union[str, locale_str] = MISSING,
|
||||||
nsfw: bool = False,
|
nsfw: bool = False,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:
|
) -> Callable[[CommandCallback[GroupT, P, T]], Command[GroupT, P, T]]:
|
||||||
"""Creates an application command from a regular function.
|
"""Creates an application command from a regular function.
|
||||||
@ -1834,7 +1834,7 @@ def command(
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
extras: :class:`dict`
|
extras: :class:`dict`
|
||||||
A dictionary that can be used to store extraneous data.
|
A dictionary that can be used to store extraneous data.
|
||||||
The library will not touch any values or keys within this dictionary.
|
The library will not touch any values or keys within this dictionary.
|
||||||
@ -1869,7 +1869,7 @@ def context_menu(
|
|||||||
*,
|
*,
|
||||||
name: Union[str, locale_str] = MISSING,
|
name: Union[str, locale_str] = MISSING,
|
||||||
nsfw: bool = False,
|
nsfw: bool = False,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[ContextMenuCallback], ContextMenu]:
|
) -> Callable[[ContextMenuCallback], ContextMenu]:
|
||||||
"""Creates an application command context menu from a regular function.
|
"""Creates an application command context menu from a regular function.
|
||||||
@ -1906,7 +1906,7 @@ def context_menu(
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
extras: :class:`dict`
|
extras: :class:`dict`
|
||||||
A dictionary that can be used to store extraneous data.
|
A dictionary that can be used to store extraneous data.
|
||||||
The library will not touch any values or keys within this dictionary.
|
The library will not touch any values or keys within this dictionary.
|
||||||
|
@ -838,7 +838,7 @@ class CommandTree(Generic[ClientT]):
|
|||||||
nsfw: bool = False,
|
nsfw: bool = False,
|
||||||
guild: Optional[Snowflake] = MISSING,
|
guild: Optional[Snowflake] = MISSING,
|
||||||
guilds: Sequence[Snowflake] = MISSING,
|
guilds: Sequence[Snowflake] = MISSING,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[CommandCallback[Group, P, T]], Command[Group, P, T]]:
|
) -> Callable[[CommandCallback[Group, P, T]], Command[Group, P, T]]:
|
||||||
"""Creates an application command directly under this tree.
|
"""Creates an application command directly under this tree.
|
||||||
@ -868,7 +868,7 @@ class CommandTree(Generic[ClientT]):
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
extras: :class:`dict`
|
extras: :class:`dict`
|
||||||
A dictionary that can be used to store extraneous data.
|
A dictionary that can be used to store extraneous data.
|
||||||
The library will not touch any values or keys within this dictionary.
|
The library will not touch any values or keys within this dictionary.
|
||||||
@ -907,7 +907,7 @@ class CommandTree(Generic[ClientT]):
|
|||||||
nsfw: bool = False,
|
nsfw: bool = False,
|
||||||
guild: Optional[Snowflake] = MISSING,
|
guild: Optional[Snowflake] = MISSING,
|
||||||
guilds: Sequence[Snowflake] = MISSING,
|
guilds: Sequence[Snowflake] = MISSING,
|
||||||
auto_locale_strings: bool = False,
|
auto_locale_strings: bool = True,
|
||||||
extras: Dict[Any, Any] = MISSING,
|
extras: Dict[Any, Any] = MISSING,
|
||||||
) -> Callable[[ContextMenuCallback], ContextMenu]:
|
) -> Callable[[ContextMenuCallback], ContextMenu]:
|
||||||
"""Creates an application command context menu from a regular function directly under this tree.
|
"""Creates an application command context menu from a regular function directly under this tree.
|
||||||
@ -951,7 +951,7 @@ class CommandTree(Generic[ClientT]):
|
|||||||
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
be wrapped into :class:`locale_str` rather than :class:`str`. This could
|
||||||
avoid some repetition and be more ergonomic for certain defaults such
|
avoid some repetition and be more ergonomic for certain defaults such
|
||||||
as default command names, command descriptions, and parameter names.
|
as default command names, command descriptions, and parameter names.
|
||||||
Defaults to ``False``.
|
Defaults to ``True``.
|
||||||
extras: :class:`dict`
|
extras: :class:`dict`
|
||||||
A dictionary that can be used to store extraneous data.
|
A dictionary that can be used to store extraneous data.
|
||||||
The library will not touch any values or keys within this dictionary.
|
The library will not touch any values or keys within this dictionary.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user