diff --git a/discord/client.py b/discord/client.py index cfd8fb122..63c86f352 100644 --- a/discord/client.py +++ b/discord/client.py @@ -124,25 +124,25 @@ if TYPE_CHECKING: from .flags import MemberCacheFlags class _ClientOptions(TypedDict, total=False): - max_messages: int - proxy: str - proxy_auth: aiohttp.BasicAuth - shard_id: int - shard_count: int + max_messages: Optional[int] + proxy: Optional[str] + proxy_auth: Optional[aiohttp.BasicAuth] + shard_id: Optional[int] + shard_count: Optional[int] application_id: int member_cache_flags: MemberCacheFlags chunk_guilds_at_startup: bool - status: Status - activity: BaseActivity - allowed_mentions: AllowedMentions + status: Optional[Status] + activity: Optional[BaseActivity] + allowed_mentions: Optional[AllowedMentions] heartbeat_timeout: float guild_ready_timeout: float assume_unsync_clock: bool enable_debug_events: bool enable_raw_presences: bool http_trace: aiohttp.TraceConfig - max_ratelimit_timeout: float - connector: aiohttp.BaseConnector + max_ratelimit_timeout: Optional[float] + connector: Optional[aiohttp.BaseConnector] # fmt: off diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 3a916d69e..0bb4cf95f 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -89,8 +89,8 @@ if TYPE_CHECKING: PrefixType = Union[_Prefix, _PrefixCallable[BotT]] class _BotOptions(_ClientOptions, total=False): - owner_id: int - owner_ids: Collection[int] + owner_id: Optional[int] + owner_ids: Optional[Collection[int]] strip_after_prefix: bool case_insensitive: bool diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 9ec0dd484..f719e977d 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -68,9 +68,9 @@ if TYPE_CHECKING: class _CommandDecoratorKwargs(TypedDict, total=False): enabled: bool - help: str - brief: str - usage: str + help: Optional[str] + brief: Optional[str] + usage: Optional[str] rest_is_raw: bool aliases: List[str] description: str diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index dabbd9ef9..8fee7b1c6 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -69,13 +69,13 @@ if TYPE_CHECKING: class _HelpCommandOptions(TypedDict, total=False): show_hidden: bool - verify_checks: bool + verify_checks: Optional[bool] command_attrs: _CommandKwargs class _BaseHelpCommandOptions(_HelpCommandOptions, total=False): sort_commands: bool - dm_help: bool - dm_help_threshold: int + dm_help: Optional[bool] + dm_help_threshold: Optional[int] no_category: str paginator: Paginator commands_heading: str @@ -1364,8 +1364,8 @@ class MinimalHelpCommand(HelpCommand): def __init__(self, **options: Unpack[_MinimalHelpCommandOptions]) -> None: self.sort_commands: bool = options.pop('sort_commands', True) self.commands_heading: str = options.pop('commands_heading', 'Commands') - self.dm_help: bool = options.pop('dm_help', False) - self.dm_help_threshold: int = options.pop('dm_help_threshold', 1000) + self.dm_help: Optional[bool] = options.pop('dm_help', False) + self.dm_help_threshold: Optional[int] = options.pop('dm_help_threshold', 1000) self.aliases_heading: str = options.pop('aliases_heading', 'Aliases:') self.no_category: str = options.pop('no_category', 'No Category')